home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / internet / others / tin130gamma.lha / 950726.diff next >
Text File  |  1995-08-05  |  73KB  |  2,607 lines

  1. + Minor changes to Smakefile (REL)
  2. + Use localtime over gmtime for speed (MLT)
  3. + Change default printer on Amiga (REL/MLT)
  4. * New "sigdashes" tinrc variable (REL)
  5. * New metamail tinrc variables (REL)
  6. + Obsolete amiga: target removed from Makefile (MLT)
  7. + time() written to replace slow library routine (MLT)
  8. + pipes improved to used named pipes (REL)
  9. * art.c made header parsing case insensitive (MLT)
  10. * art.c don't call str_dup with a blank string (MLT)
  11. * attrib.c speed up reading attribute file (MLT)
  12. * config.c speed up reading tinrc file (MLT)
  13. + curses.c patched for amiga profiler (MLT)
  14. * filter.c speed up reading filter file (MLT)
  15. * hashstr.c speed up hash function and reduce mallocs (MLT)
  16. * memory.c change calloc() to malloc() for speed (MLT)
  17. * misc.c change copy_fp() to be quicker copying files (MLT)
  18. * stricmp() and str_lwr() speed improved (MLT)
  19. * newsrc.c small bug fixed (showed up after changing malloc call!) (MLT)
  20. * page.c asking for metamail now configurable (REL)
  21. * match_header speed improved (MLT)
  22. * pgp.c one too many "void"s removed. (MLT)
  23. * sigfile.c changed to configure sigdashes (REL)
  24.  
  25. diff -cr 950726/amiga/smakefile 950726.new/amiga/smakefile
  26. *** 950726/amiga/smakefile    Fri Jul 28 05:20:18 1995
  27. --- 950726.new/amiga/smakefile    Fri Jul 28 07:20:01 1995
  28. ***************
  29. *** 1,5 ****
  30.   #
  31. ! # $VER: tin_makefile 1.3B950419
  32.   #
  33.   # This is especially for use with the SAS/C developing system
  34.   # version 6.50 and above
  35. --- 1,5 ----
  36.   #
  37. ! # $VER: tin_makefile 1.3 (17.7.95)
  38.   #
  39.   # This is especially for use with the SAS/C developing system
  40.   # version 6.50 and above
  41. ***************
  42. *** 15,23 ****
  43.   # Include the next two lines to enable an NNTP version of TIN.
  44.   # To use AS225 rather than AmiTCP, also include "def AS225".
  45.   
  46. ! # NNTPINC  = idir=netinclude:
  47. ! # NNTPDEF  = def NNTP_ABLE def INEWS_MAIL_DOMAIN="$$DOMAIN" \
  48. ! #     def INEWS_MAIL_GATEWAY=""
  49.   
  50.   # Next line enables tind to be created
  51.   # NB: change PROJECT and GSTFILE to tind also!
  52. --- 15,23 ----
  53.   # Include the next two lines to enable an NNTP version of TIN.
  54.   # To use AS225 rather than AmiTCP, also include "def AS225".
  55.   
  56. ! NNTPINC  = idir=netinclude:
  57. ! NNTPDEF  = def NNTP_ABLE def INEWS_MAIL_DOMAIN="$$DOMAIN" \
  58. !     def INEWS_MAIL_GATEWAY=""
  59.   
  60.   # Next line enables tind to be created
  61.   # NB: change PROJECT and GSTFILE to tind also!
  62. ***************
  63. *** 37,43 ****
  64.   #
  65.   
  66.   SCOPTIONS = strmer data=near parms=register nover errrexx ignore=93,104,105 \
  67. !             nostkchk idir=$(INCDIR) $(NNTPINC) gst=$(GSTFILE) cpu=$(CPU)
  68.   
  69.   # comment the next two lines, for the final release
  70.   
  71. --- 37,43 ----
  72.   #
  73.   
  74.   SCOPTIONS = strmer data=near parms=register nover errrexx ignore=93,104,105 \
  75. !             idir=$(INCDIR) $(NNTPINC) gst=$(GSTFILE) cpu=$(CPU)
  76.   
  77.   # comment the next two lines, for the final release
  78.   
  79. diff -cr 950726/include/amiga.h 950726.new/include/amiga.h
  80. *** 950726/include/amiga.h    Fri Jul 28 05:20:22 1995
  81. --- 950726.new/include/amiga.h    Fri Jul 28 07:21:18 1995
  82. ***************
  83. *** 58,63 ****
  84. --- 58,65 ----
  85.   /* There are two currently unused signals we can define */
  86.   #define SIGWINCH    _SIG_MAX
  87.   
  88. + #define localtime gmtime
  89.   extern DIR *opendir (char *name);
  90.   extern struct dirent *readdir (DIR *di);
  91.   extern void closedir (DIR *di);
  92. ***************
  93. *** 71,77 ****
  94.   extern int getpid(void);
  95.   extern int setenv(char *, char *);
  96.   extern char *mktemp(char *);
  97. ! extern int umask(int);
  98.   
  99.   extern int optind;
  100.   extern char *optarg;
  101. --- 73,79 ----
  102.   extern int getpid(void);
  103.   extern int setenv(char *, char *);
  104.   extern char *mktemp(char *);
  105. ! extern unsigned short umask(unsigned short);
  106.   
  107.   extern int optind;
  108.   extern char *optarg;
  109. diff -cr 950726/include/extern.h 950726.new/include/extern.h
  110. *** 950726/include/extern.h    Tue Jun 20 05:38:24 1995
  111. --- 950726.new/include/extern.h    Fri Jul 28 05:45:36 1995
  112. ***************
  113. *** 855,860 ****
  114. --- 855,861 ----
  115.   extern int show_description;
  116.   extern int show_last_line_prev_page;
  117.   extern int show_only_unread_groups;
  118. + extern int sigdashes;
  119.   extern int space_mode;
  120.   extern int start_editor_offset;
  121.   extern int start_line_offset;
  122. ***************
  123. *** 874,879 ****
  124. --- 875,884 ----
  125.   extern int verbose;
  126.   extern int update_fork;
  127.   extern int use_keypad;
  128. + #ifdef HAVE_METAMAIL
  129. + extern int use_metamail;
  130. + extern int ask_for_metamail;
  131. + #endif
  132.   extern int use_mouse;
  133.   extern int check_any_unread;
  134.   extern int start_any_unread;
  135. ***************
  136. *** 885,891 ****
  137.   extern int xcol;
  138.   extern int xrow;
  139.   extern int reread_active_file_secs;
  140. - extern int use_metamail;
  141.   
  142.   extern long *base;
  143.   extern time_t new_newnews_time;
  144. --- 890,895 ----
  145. diff -cr 950726/include/proto.h 950726.new/include/proto.h
  146. *** 950726/include/proto.h    Fri Jul 28 05:20:24 1995
  147. --- 950726.new/include/proto.h    Fri Jul 28 08:09:19 1995
  148. ***************
  149. *** 161,167 ****
  150.   extern void show_group_title P_((int clear_title));
  151.   /* ./hashstr.c */
  152.   extern char *hash_str P_((char *s));
  153. - extern struct t_hashnode *add_string P_((char *s));
  154.   extern void hash_init P_((void));
  155.   extern void hash_reclaim P_((void));
  156.   /* ./help.c */
  157. --- 161,166 ----
  158. ***************
  159. *** 254,259 ****
  160. --- 253,259 ----
  161.   extern void parse_from P_((char *from_line, char *eaddr, char *fname));
  162.   extern long my_atol P_((char *s, int n));
  163.   extern int my_stricmp P_((char *p, char *q));
  164. + extern int my_strnicmp P_((char *p, char *q, size_t n));
  165.   extern char *eat_re P_((char *s));
  166.   extern long hash_s P_((char *s));
  167.   extern void my_strncpy P_((char *p, char *q, int n));
  168. diff -cr 950726/include/tin.h 950726.new/include/tin.h
  169. *** 950726/include/tin.h    Fri Jul 28 05:20:26 1995
  170. --- 950726.new/include/tin.h    Fri Jul 28 11:31:47 1995
  171. ***************
  172. *** 360,366 ****
  173.   #        define    DEFAULT_MAILBOX     "uumail:"
  174.   #        define    DEFAULT_MAILER        "uucp:c/sendmail"
  175.   #        define    DEFAULT_POSTER        "uucp:c/postnews %s"
  176. ! #        define    DEFAULT_PRINTER     "c:copy PIPE: NIL:"
  177.   #        define    DEFAULT_SHELL        "c:newshell"    /* Not Yet Implemented */
  178.   #        define    DEFAULT_UUDECODE    "uudecode %s"
  179.   #        define    DEFAULT_UNSHAR        "unshar %s"
  180. --- 360,367 ----
  181.   #        define    DEFAULT_MAILBOX     "uumail:"
  182.   #        define    DEFAULT_MAILER        "uucp:c/sendmail"
  183.   #        define    DEFAULT_POSTER        "uucp:c/postnews %s"
  184. ! #        define    DEFAULT_PRINTER     "c:copy to PRT:"
  185. ! #        define    DEFAULT_BBS_PRINTER    "c:copy to NIL:"
  186.   #        define    DEFAULT_SHELL        "c:newshell"    /* Not Yet Implemented */
  187.   #        define    DEFAULT_UUDECODE    "uudecode %s"
  188.   #        define    DEFAULT_UNSHAR        "unshar %s"
  189. ***************
  190. *** 1283,1290 ****
  191.   #    define    ENV_VAR_SHELL        "SHELL"
  192.   #    define    EDITOR_FORMAT_ON    "%E %F"
  193.   #    define    MAILER_FORMAT        "%M <%F -f %U"
  194. ! #    define    METAMAIL_CMD        "metamail -e -p -m \"tin\" PIPE:"
  195. ! #    define    TMPDIR "T:"
  196.   #    ifdef    HAVE_KEY_PREFIX
  197.   #        define    KEY_PREFIX    0x9b
  198.   #    endif
  199. --- 1284,1291 ----
  200.   #    define    ENV_VAR_SHELL        "SHELL"
  201.   #    define    EDITOR_FORMAT_ON    "%E %F"
  202.   #    define    MAILER_FORMAT        "%M <%F -f %U"
  203. ! #    define    METAMAIL_CMD        "metamail -e -p -m \"tin\""
  204. ! #    define    TMPDIR            "T:"
  205.   #    ifdef    HAVE_KEY_PREFIX
  206.   #        define    KEY_PREFIX    0x9b
  207.   #    endif
  208. diff -cr 950726/src/Makefile 950726.new/src/Makefile
  209. *** 950726/src/Makefile    Fri Jul 28 05:20:30 1995
  210. --- 950726.new/src/Makefile    Fri Jul 28 05:48:45 1995
  211. ***************
  212. *** 40,49 ****
  213.   # Use INN clientlibs config functions (add -DUSE_INN_NNTPLIB to COPTS line)
  214.   INN_NNTPLIB=
  215.   
  216. - AMIGA_COPTS=-so -wc -m0s -DM_AMIGA -DSYSV -DSLOW_SCREEN_UPDATE \
  217. -         -DNO_PIPING -DNO_SHELL_ESCAPE -DAMIGA_BBS -DLIBDIR=""uulib:"" \
  218. -         -DSPOOLDIR=""uunews:""
  219.   # Project
  220.   PROJECT    = tin
  221.   EXE        = tin
  222. --- 40,45 ----
  223. ***************
  224. *** 244,254 ****
  225.               -DNOVROOTDIR=\"$(NOVROOTDIR)\"' \
  226.               LIBS="-lcurses -ltermcap $(INN_NNTPLIB)" \
  227.               EXE=tin linkit
  228. - # For Commodore AmigaOS
  229. - amiga:
  230. -     @$(ECHO) "Compiling $(EXE) v$(VER) for AmigaDOS (Manx-C 5.2)..."
  231. -     $(MAKE) CC=$(CC) "CFLAGS=$(AMIGA_COPTS)" LIBS=-lc EXE=tin linkit
  232.   
  233.   # For Apollo 
  234.   apollo:
  235. --- 240,245 ----
  236. diff -cr 950726/src/amiga.c 950726.new/src/amiga.c
  237. *** 950726/src/amiga.c    Fri Jul 28 05:20:28 1995
  238. --- 950726.new/src/amiga.c    Fri Jul 28 05:58:51 1995
  239. ***************
  240. *** 3,9 ****
  241.    *  Module    : amiga.c
  242.    *  Author    : M.Tomlinson, R.Luebke & I.Lea
  243.    *  Created   : 01-04-91
  244. !  *  Updated   : 09-08-94
  245.    *  Notes     : Extra functions for Amiga port
  246.    *  Copyright : (c) Copyright 1991-94 by Mark Tomlinson & Iain Lea
  247.    *              You may  freely  copy or  redistribute  this software,
  248. --- 3,9 ----
  249.    *  Module    : amiga.c
  250.    *  Author    : M.Tomlinson, R.Luebke & I.Lea
  251.    *  Created   : 01-04-91
  252. !  *  Updated   : 17-07-95
  253.    *  Notes     : Extra functions for Amiga port
  254.    *  Copyright : (c) Copyright 1991-94 by Mark Tomlinson & Iain Lea
  255.    *              You may  freely  copy or  redistribute  this software,
  256. ***************
  257. *** 42,48 ****
  258.   /*
  259.   ** something for the AmigaDOS Version command
  260.   ** AMIVER is defined in ../include/patchlev.h
  261. ! ** __AMIGADATE__ is defined by the SC 6.51 preprocessor
  262.   */
  263.   static const char verstag[] = "$VER: tin " AMIVER " " __AMIGADATE__ "\0";
  264.   
  265. --- 42,48 ----
  266.   /*
  267.   ** something for the AmigaDOS Version command
  268.   ** AMIVER is defined in ../include/patchlev.h
  269. ! ** __AMIGADATE__ is defined by the SC 6.55 preprocessor
  270.   */
  271.   static const char verstag[] = "$VER: tin " AMIVER " " __AMIGADATE__ "\0";
  272.   
  273. ***************
  274. *** 99,114 ****
  275.   chmod (file, mode)
  276.       const char *file;
  277.       int mode;
  278. ! {    
  279.       return 0;
  280.   }
  281.   
  282. ! int umask (mask)
  283. !     int mask;
  284.   {
  285.       return mask;
  286.   }
  287.   
  288.   /*
  289.    * use the task address for pid which is unique.
  290.    */
  291. --- 99,127 ----
  292.   chmod (file, mode)
  293.       const char *file;
  294.       int mode;
  295. ! {
  296.       return 0;
  297.   }
  298.   
  299. ! unsigned short umask (mask)
  300. !     unsigned short mask;
  301.   {
  302.       return mask;
  303.   }
  304.   
  305. + time_t time(pt)
  306. +     time_t *pt;
  307. + {
  308. +     time_t t;
  309. +     struct DateStamp ds;
  310. +     DateStamp(&ds);
  311. +     t = ((ds.ds_Days + (365 * 8 + 2)) * (24*60) + ds.ds_Minute) * 60
  312. +         + ds.ds_Tick / TICKS_PER_SECOND;
  313. +     if (pt) *pt = t;
  314. +     return t;
  315. + }
  316.   /*
  317.    * use the task address for pid which is unique.
  318.    */
  319. ***************
  320. *** 115,121 ****
  321.   
  322.   int
  323.   getpid (void)
  324. ! {    
  325.       return ((long) FindTask(0L) >> 2);
  326.   }
  327.   
  328. --- 128,134 ----
  329.   
  330.   int
  331.   getpid (void)
  332. ! {
  333.       return ((long) FindTask(0L) >> 2);
  334.   }
  335.   
  336. ***************
  337. *** 185,191 ****
  338.               ACTION_SCREEN_MODE,args,1) == DOSTRUE) ?
  339.           0 : -1;
  340.   }
  341. !     
  342.   /* 
  343.    * stub for tputs 
  344.    */
  345. --- 198,204 ----
  346.               ACTION_SCREEN_MODE,args,1) == DOSTRUE) ?
  347.           0 : -1;
  348.   }
  349.   /* 
  350.    * stub for tputs 
  351.    */
  352. ***************
  353. *** 200,206 ****
  354.       if (! str) {
  355.           return 0;
  356.       }
  357. !     
  358.       while (*str) {
  359.           if (*str == '\n') 
  360.               func('\r'); 
  361. --- 213,219 ----
  362.       if (! str) {
  363.           return 0;
  364.       }
  365.       while (*str) {
  366.           if (*str == '\n') 
  367.               func('\r'); 
  368. ***************
  369. *** 223,229 ****
  370.       char *str;
  371.       char *dir;
  372.       char *file;
  373. ! {    
  374.       char c, *p;
  375.   
  376.       if (tin_bbs_mode) {
  377. --- 236,242 ----
  378.       char *str;
  379.       char *dir;
  380.       char *file;
  381. ! {
  382.       char c, *p;
  383.   
  384.       if (tin_bbs_mode) {
  385. ***************
  386. *** 252,258 ****
  387.   unsigned int
  388.   sleep (seconds)
  389.       unsigned int seconds;
  390. ! {    
  391.       if (seconds) Delay (50*seconds);
  392.       return seconds;
  393.   }
  394. --- 265,271 ----
  395.   unsigned int
  396.   sleep (seconds)
  397.       unsigned int seconds;
  398. ! {
  399.       if (seconds) Delay (50*seconds);
  400.       return seconds;
  401.   }
  402. ***************
  403. *** 267,282 ****
  404.       char *mode;
  405.   {
  406.       char cmd[256];
  407.   
  408.       if (mode[0] == 'w') {
  409. !         sprintf (cmd, "run >NIL: %s", command);
  410. !         Execute (cmd, 0L, 0L);
  411. !         return fopen ("PIPE:", mode);
  412.       } else {
  413.           FILE *rp;
  414. !         rp = fopen ("PIPE:", mode);
  415. !         sprintf (cmd,"run %s >PIPE:",command);
  416. !         Execute (cmd, 0L, 0L);
  417.           return rp;
  418.       }
  419.   }
  420. --- 280,298 ----
  421.       char *mode;
  422.   {
  423.       char cmd[256];
  424. +     char pname[16];
  425.   
  426. +     sprintf(pname, "PIPE:%08X", FindTask(NULL));
  427.       if (mode[0] == 'w') {
  428. !         sprintf (cmd, "run >NIL: %s %s", command, pname);
  429. !         system (cmd);
  430. !         return fopen (pname, mode);
  431.       } else {
  432.           FILE *rp;
  433. !         rp = fopen (pname, mode);
  434. !         sprintf (cmd,"run %s >%s",command, pname);
  435. !         system (cmd);
  436.           return rp;
  437.       }
  438.   }
  439. ***************
  440. *** 285,291 ****
  441.   int
  442.   pclose (pipe)
  443.       FILE *pipe;
  444. ! {    
  445.       return fclose (pipe);
  446.   }
  447.   
  448. --- 301,307 ----
  449.   int
  450.   pclose (pipe)
  451.       FILE *pipe;
  452. ! {
  453.       return fclose (pipe);
  454.   }
  455.   
  456. ***************
  457. *** 300,336 ****
  458.       DIR *di;
  459.   
  460.       di = calloc (1, sizeof (DIR));
  461. !      if (di == 0) {
  462. !          return 0;
  463. !      }
  464.       di->Lock = Lock (name,ACCESS_READ);
  465.       if (di->Lock == 0) {
  466.           free (di); 
  467.           return 0;
  468.       }
  469. !      if (DOSBase->dl_lib.lib_Version >= 37) {
  470. !          di->buffer = (struct ExAllData *)malloc(BUFSIZE);
  471. !          if (di->buffer == 0) {
  472. !              UnLock(di->Lock);
  473. !              free(di);
  474. !              return 0;
  475. !          }
  476. !          di->eac = AllocDosObject(DOS_EXALLCONTROL,NULL);
  477. !          if ((di->eac) == 0) {
  478. !              free(di->buffer);
  479. !              UnLock(di->Lock);
  480. !              free(di);
  481. !              return 0;
  482. !          }
  483. !          di->eac->eac_LastKey = 0;
  484. !          di->more = 1;
  485. !      } else {
  486. !          if (Examine(di->Lock,&di->fib)==0) {
  487. !              UnLock(di->Lock); 
  488. !              free (di); 
  489. !              return 0;
  490. !          }
  491. !      }
  492.       return di;
  493.   }
  494.   
  495. --- 316,352 ----
  496.       DIR *di;
  497.   
  498.       di = calloc (1, sizeof (DIR));
  499. !     if (di == 0) {
  500. !         return 0;
  501. !     }
  502.       di->Lock = Lock (name,ACCESS_READ);
  503.       if (di->Lock == 0) {
  504.           free (di); 
  505.           return 0;
  506.       }
  507. !     if (DOSBase->dl_lib.lib_Version >= 37) {
  508. !         di->buffer = (struct ExAllData *)malloc(BUFSIZE);
  509. !         if (di->buffer == 0) {
  510. !             UnLock(di->Lock);
  511. !             free(di);
  512. !             return 0;
  513. !         }
  514. !         di->eac = AllocDosObject(DOS_EXALLCONTROL,NULL);
  515. !         if ((di->eac) == 0) {
  516. !             free(di->buffer);
  517. !             UnLock(di->Lock);
  518. !             free(di);
  519. !             return 0;
  520. !         }
  521. !         di->eac->eac_LastKey = 0;
  522. !         di->more = 1;
  523. !     } else {
  524. !         if (Examine(di->Lock,&di->fib)==0) {
  525. !             UnLock(di->Lock); 
  526. !             free (di); 
  527. !             return 0;
  528. !         }
  529. !     }
  530.       return di;
  531.   }
  532.   
  533. ***************
  534. *** 341,366 ****
  535.   {
  536.       static struct dirent de;
  537.   
  538. !      if (DOSBase->dl_lib.lib_Version >= 37) {
  539. !          while (! di->bufp) {
  540. !              if (! di->more) {
  541. !                  return 0;
  542. !              }
  543. !              di->more = ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac);
  544. !              if (di->eac->eac_Entries) {
  545. !                  di->bufp = di->buffer;
  546. !              }
  547. !          }
  548. !          de.d_name = di->bufp->ed_Name;
  549. !          de.d_reclen = strlen (de.d_name);
  550. !          di->bufp = di->bufp->ed_Next;
  551. !      } else {
  552. !          if (ExNext (di->Lock, &di->fib) == 0) {
  553. !              return 0;
  554. !          }
  555. !          de.d_name = di->fib.fib_FileName;
  556. !          de.d_reclen = strlen (de.d_name);
  557. !       }
  558.   
  559.       return &de;
  560.   }
  561. --- 357,382 ----
  562.   {
  563.       static struct dirent de;
  564.   
  565. !     if (DOSBase->dl_lib.lib_Version >= 37) {
  566. !         while (! di->bufp) {
  567. !             if (! di->more) {
  568. !                 return 0;
  569. !             }
  570. !             di->more = ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac);
  571. !             if (di->eac->eac_Entries) {
  572. !                 di->bufp = di->buffer;
  573. !             }
  574. !         }
  575. !         de.d_name = di->bufp->ed_Name;
  576. !         de.d_reclen = strlen (de.d_name);
  577. !         di->bufp = di->bufp->ed_Next;
  578. !     } else {
  579. !         if (ExNext (di->Lock, &di->fib) == 0) {
  580. !             return 0;
  581. !         }
  582. !         de.d_name = di->fib.fib_FileName;
  583. !         de.d_reclen = strlen (de.d_name);
  584. !     }
  585.   
  586.       return &de;
  587.   }
  588. ***************
  589. *** 369,383 ****
  590.   void 
  591.   closedir (di)
  592.       DIR *di;
  593. ! {    
  594. !      if (DOSBase->dl_lib.lib_Version >= 37) {
  595. !          if (di->more)
  596. !              while (ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac))
  597. !                  /* do nothing */ ;
  598. !          free(di->buffer);
  599. !          FreeDosObject(DOS_EXALLCONTROL,di->eac);
  600. !      }
  601. !     
  602.       UnLock (di->Lock);
  603.       free (di);
  604.   }
  605. --- 385,399 ----
  606.   void 
  607.   closedir (di)
  608.       DIR *di;
  609. ! {
  610. !     if (DOSBase->dl_lib.lib_Version >= 37) {
  611. !         if (di->more)
  612. !             while (ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac))
  613. !                 /* do nothing */ ;
  614. !         free(di->buffer);
  615. !         FreeDosObject(DOS_EXALLCONTROL,di->eac);
  616. !     }
  617.       UnLock (di->Lock);
  618.       free (di);
  619.   }
  620. ***************
  621. *** 569,575 ****
  622.   
  623.   #ifdef NNTP_ABLE
  624.   
  625. ! #define NUM_TEMP_FP 6
  626.   static struct {
  627.       FILE *fp;
  628.       char name[PATH_LEN];
  629. --- 585,591 ----
  630.   
  631.   #ifdef NNTP_ABLE
  632.   
  633. ! #define NUM_TEMP_FP 4
  634.   static struct {
  635.       FILE *fp;
  636.       char name[PATH_LEN];
  637. diff -cr 950726/src/art.c 950726.new/src/art.c
  638. *** 950726/src/art.c    Mon Jun 19 03:35:00 1995
  639. --- 950726.new/src/art.c    Fri Jul 28 06:07:02 1995
  640. ***************
  641. *** 552,558 ****
  642.           *ptr++ = '\0';
  643.           lineno++;
  644.   
  645. !         switch (*ptrline) {
  646.               case 'F':    /* From:  mandatory */
  647.               case 'T':    /* To:    mandatory (mailbox) */
  648.                   if (! got_from) {
  649. --- 552,558 ----
  650.           *ptr++ = '\0';
  651.           lineno++;
  652.   
  653. !         switch (toupper(*ptrline)) {
  654.               case 'F':    /* From:  mandatory */
  655.               case 'T':    /* To:    mandatory (mailbox) */
  656.                   if (! got_from) {
  657. ***************
  658. *** 604,611 ****
  659.                   break;
  660.               case 'X':    /* Xref:  optional */
  661.                   if (! got_xref) {
  662. !                     if (match_header (ptrline, "Xref", buf2, HEADER_LEN) ||
  663. !                         match_header (ptrline, "xref", buf2, HEADER_LEN)) {
  664.                           s = buf2;
  665.                           while (*s && *s == ' ') {
  666.                               s++;
  667. --- 604,610 ----
  668.                   break;
  669.               case 'X':    /* Xref:  optional */
  670.                   if (! got_xref) {
  671. !                     if (match_header (ptrline, "Xref", buf2, HEADER_LEN)) {
  672.                           s = buf2;
  673.                           while (*s && *s == ' ') {
  674.                               s++;
  675. ***************
  676. *** 617,624 ****
  677.                   break;
  678.               case 'M':    /* Message-ID: */
  679.                   if (! got_msgid) {
  680. !                     if (match_header (ptrline, "Message-ID", buf2, HEADER_LEN) ||
  681. !                         match_header (ptrline, "Message-Id", buf2, HEADER_LEN)) {
  682.                           s = buf2;
  683.                           while (*s && *s == ' ') {
  684.                               s++;
  685. --- 616,622 ----
  686.                   break;
  687.               case 'M':    /* Message-ID: */
  688.                   if (! got_msgid) {
  689. !                     if (match_header (ptrline, "Message-ID", buf2, HEADER_LEN)) {
  690.                           s = buf2;
  691.                           while (*s && *s == ' ') {
  692.                               s++;
  693. ***************
  694. *** 637,644 ****
  695.                   }
  696.                   break;
  697.               case 'A':    /* Archive-name:  optional */
  698. !                 if (match_header (ptrline, "Archive-name", buf2, HEADER_LEN) ||
  699. !                     match_header (ptrline, "Archive-Name", buf2, HEADER_LEN)) {
  700.                       if ((s = (char *) strchr (buf2, '/')) != (char *) 0) {
  701.                           if (STRNCMPEQ(s+1, "part", 4) || 
  702.                               STRNCMPEQ(s+1, "Part", 4)) {
  703. --- 635,641 ----
  704.                   }
  705.                   break;
  706.               case 'A':    /* Archive-name:  optional */
  707. !                 if (match_header (ptrline, "Archive-name", buf2, HEADER_LEN)) {
  708.                       if ((s = (char *) strchr (buf2, '/')) != (char *) 0) {
  709.                           if (STRNCMPEQ(s+1, "part", 4) || 
  710.                               STRNCMPEQ(s+1, "Part", 4)) {
  711. ***************
  712. *** 827,833 ****
  713.           } else {
  714.               *q = '\0';
  715.           }
  716. !         arts[top].msgid = str_dup (p);
  717.           p = q + 1;
  718.    
  719.           /* 
  720. --- 824,834 ----
  721.           } else {
  722.               *q = '\0';
  723.           }
  724. !         if (*p) {
  725. !             arts[top].msgid = str_dup (p);
  726. !         } else {
  727. !             arts[top].msgid = (char *) 0;
  728. !         }
  729.           p = q + 1;
  730.    
  731.           /* 
  732. ***************
  733. *** 841,847 ****
  734.           } else {
  735.               *q = '\0';
  736.           }
  737. !         arts[top].refs = str_dup (p);
  738.           p = q + 1;
  739.    
  740.           /* 
  741. --- 842,852 ----
  742.           } else {
  743.               *q = '\0';
  744.           }
  745. !         if (*p) {
  746. !             arts[top].refs = str_dup (p);
  747. !         } else {
  748. !             arts[top].refs = 0;
  749. !         }
  750.           p = q + 1;
  751.    
  752.           /* 
  753. diff -cr 950726/src/attrib.c 950726.new/src/attrib.c
  754. *** 950726/src/attrib.c    Tue Jun 20 05:38:26 1995
  755. --- 950726.new/src/attrib.c    Fri Jul 28 06:09:04 1995
  756. ***************
  757. *** 179,298 ****
  758.               if (line[0] == '#' || line[0] == '\n') {
  759.                   continue;
  760.               }
  761. !             if (match_string (line, "scope=", scope, sizeof (scope))) {
  762. !                 continue;
  763. !             }
  764. !             if (match_string (line, "maildir=", buf, sizeof (buf))) {
  765. !                 set_attrib_str (ATTRIB_MAILDIR, scope, buf);
  766. !                 continue;
  767. !             }
  768. !             if (match_string (line, "savedir=", buf, sizeof (buf))) {
  769. !                 set_attrib_str (ATTRIB_SAVEDIR, scope, buf);
  770. !                 continue;
  771. !             }
  772. !             if (match_string (line, "savefile=", buf, sizeof (buf))) {
  773. !                 set_attrib_str (ATTRIB_SAVEFILE, scope, buf);
  774. !                 continue;
  775. !             }
  776. !             if (match_string (line, "sigfile=", buf, sizeof (buf))) {
  777. !                 set_attrib_str (ATTRIB_SIGFILE, scope, buf);
  778. !                 continue;
  779. !             }
  780. !             if (match_string (line, "organization=", buf, sizeof (buf))) {
  781. !                 set_attrib_str (ATTRIB_ORGANIZATION, scope, buf);
  782. !                 continue;
  783. !             }
  784. !             if (match_string (line, "followup_to=", buf, sizeof (buf))) {
  785. !                 set_attrib_str (ATTRIB_FOLLOWUP_TO, scope, buf);
  786. !                 continue;
  787. !             }
  788. !             if (match_string (line, "printer=", buf, sizeof (buf))) {
  789. !                 set_attrib_str (ATTRIB_PRINTER, scope, buf);
  790. !                 continue;
  791. !             }
  792. !             if (match_boolean (line, "show_only_unread=", &num)) {
  793. !                 set_attrib_num (ATTRIB_SHOW_ONLY_UNREAD, scope, num);
  794. !                 continue;
  795. !             }
  796. !             if (match_boolean (line, "thread_arts=", &num)) {
  797. !                 set_attrib_num (ATTRIB_THREAD_ARTS, scope, num);
  798. !                 continue;
  799. !             }
  800. !             if (match_boolean (line, "auto_select=", &num)) {
  801. !                 set_attrib_num (ATTRIB_AUTO_SELECT, scope, num);
  802. !                 continue;
  803. !             }
  804. !             if (match_boolean (line, "auto_save=", &num)) {
  805. !                 set_attrib_num (ATTRIB_AUTO_SAVE, scope, num);
  806. !                 continue;
  807. !             }
  808. !             if (match_boolean (line, "auto_save_msg=", &num)) {
  809. !                 set_attrib_num (ATTRIB_AUTO_SAVE_MSG, scope, num);
  810. !                 continue;
  811. !             }
  812. !             if (match_boolean (line, "batch_save=", &num)) {
  813. !                 set_attrib_num (ATTRIB_BATCH_SAVE, scope, num);
  814. !                 continue;
  815. !             }
  816. !             if (match_boolean (line, "delete_tmp_files=", &num)) {
  817. !                 set_attrib_num (ATTRIB_DELETE_TMP_FILES, scope, num);
  818. !                 continue;
  819. !             }
  820. !             if (match_integer (line, "sort_art_type=", &num)) {
  821. !                 set_attrib_num (ATTRIB_SORT_ART_TYPE, scope, num);
  822. !                 continue;
  823. !             }
  824. !             if (match_integer (line, "show_author=", &num)) {
  825. !                 set_attrib_num (ATTRIB_SHOW_AUTHOR, scope, num);
  826. !                 continue;
  827. !             }
  828. !             if (match_integer (line, "post_proc_type=", &num)) {
  829. !                 set_attrib_num (ATTRIB_POST_PROC_TYPE, scope, num);
  830. !                 continue;
  831. !             }
  832. !             if (match_integer (line, "quick_kill_header=", &num)) {
  833. !                 set_attrib_num (ATTRIB_QUICK_KILL_HEADER, scope, num);
  834. !                 continue;
  835. !             }
  836. !             if (match_string (line, "quick_kill_scope=", buf, sizeof (buf))) {
  837. !                 set_attrib_str (ATTRIB_QUICK_KILL_SCOPE, scope, buf);
  838. !                 continue;
  839. !             }
  840. !             if (match_boolean (line, "quick_kill_case=", &num)) {
  841. !                 set_attrib_num (ATTRIB_QUICK_KILL_CASE, scope, num);
  842. !                 continue;
  843. !             }
  844. !             if (match_boolean (line, "quick_kill_expire=", &num)) {
  845. !                 set_attrib_num (ATTRIB_QUICK_KILL_EXPIRE, scope, num);
  846. !                 continue;
  847. !             }
  848. !             if (match_integer (line, "quick_select_header=", &num)) {
  849. !                 set_attrib_num (ATTRIB_QUICK_SELECT_HEADER, scope, num);
  850. !                 continue;
  851. !             }
  852. !             if (match_string (line, "quick_select_scope=", buf, sizeof (buf))) {
  853. !                 set_attrib_str (ATTRIB_QUICK_SELECT_SCOPE, scope, buf);
  854. !                 continue;
  855. !             }
  856. !             if (match_boolean (line, "quick_select_case=", &num)) {
  857. !                 set_attrib_num (ATTRIB_QUICK_SELECT_CASE, scope, num);
  858. !                 continue;
  859. !             }
  860. !             if (match_boolean (line, "quick_select_expire=", &num)) {
  861. !                 set_attrib_num (ATTRIB_QUICK_SELECT_EXPIRE, scope, num);
  862. !                 continue;
  863. !             }
  864. !             if (match_string (line, "mailing_list=", buf, sizeof (buf))) {
  865. !                 set_attrib_str (ATTRIB_MAILING_LIST, scope, buf);
  866. !                 continue;
  867. !         }
  868. !             if (match_string (line, "x_headers=", buf, sizeof (buf))) {
  869. !                 set_attrib_str (ATTRIB_X_HEADERS, scope, buf);
  870. !                 continue;
  871. !             }
  872. !             if (match_string (line, "x_body=", buf, sizeof (buf))) {
  873. !                 set_attrib_str (ATTRIB_X_BODY, scope, buf);
  874. !                 continue;
  875.               }
  876.           }
  877.           fclose (fp);
  878. --- 179,322 ----
  879.               if (line[0] == '#' || line[0] == '\n') {
  880.                   continue;
  881.               }
  882. !             switch(tolower(line[0])) {
  883. !             case 'a':
  884. !                 if (match_boolean (line, "auto_select=", &num)) {
  885. !                     set_attrib_num (ATTRIB_AUTO_SELECT, scope, num);
  886. !                     break;
  887. !                 }
  888. !                 if (match_boolean (line, "auto_save=", &num)) {
  889. !                     set_attrib_num (ATTRIB_AUTO_SAVE, scope, num);
  890. !                     break;
  891. !                 }
  892. !                 if (match_boolean (line, "auto_save_msg=", &num)) {
  893. !                     set_attrib_num (ATTRIB_AUTO_SAVE_MSG, scope, num);
  894. !                     break;
  895. !                 }
  896. !                 break;
  897. !             case 'b':
  898. !                 if (match_boolean (line, "batch_save=", &num)) {
  899. !                     set_attrib_num (ATTRIB_BATCH_SAVE, scope, num);
  900. !                     break;
  901. !                 }
  902. !                 break;
  903. !             case 'd':
  904. !                 if (match_boolean (line, "delete_tmp_files=", &num)) {
  905. !                     set_attrib_num (ATTRIB_DELETE_TMP_FILES, scope, num);
  906. !                     break;
  907. !                 }
  908. !                 break;
  909. !             case 'f':
  910. !                 if (match_string (line, "followup_to=", buf, sizeof (buf))) {
  911. !                     set_attrib_str (ATTRIB_FOLLOWUP_TO, scope, buf);
  912. !                     break;
  913. !                 }
  914. !                 break;
  915. !             case 'm':
  916. !                 if (match_string (line, "maildir=", buf, sizeof (buf))) {
  917. !                     set_attrib_str (ATTRIB_MAILDIR, scope, buf);
  918. !                     break;
  919. !                 }
  920. !                 if (match_string (line, "mailing_list=", buf, sizeof (buf))) {
  921. !                     set_attrib_str (ATTRIB_MAILING_LIST, scope, buf);
  922. !                     break;
  923. !                 }
  924. !                 break;
  925. !             case 'o':
  926. !                 if (match_string (line, "organization=", buf, sizeof (buf))) {
  927. !                     set_attrib_str (ATTRIB_ORGANIZATION, scope, buf);
  928. !                     break;
  929. !                 }
  930. !                 break;
  931. !             case 'p':
  932. !                 if (match_string (line, "printer=", buf, sizeof (buf))) {
  933. !                     set_attrib_str (ATTRIB_PRINTER, scope, buf);
  934. !                     break;
  935. !                 }
  936. !                 if (match_integer (line, "post_proc_type=", &num)) {
  937. !                     set_attrib_num (ATTRIB_POST_PROC_TYPE, scope, num);
  938. !                     break;
  939. !                 }
  940. !                 break;
  941. !             case 'q':
  942. !                 if (match_integer (line, "quick_kill_header=", &num)) {
  943. !                     set_attrib_num (ATTRIB_QUICK_KILL_HEADER, scope, num);
  944. !                     break;
  945. !                     }
  946. !                 if (match_string (line, "quick_kill_scope=", buf, sizeof (buf))) {
  947. !                     set_attrib_str (ATTRIB_QUICK_KILL_SCOPE, scope, buf);
  948. !                     break;
  949. !                 }
  950. !                 if (match_boolean (line, "quick_kill_case=", &num)) {
  951. !                     set_attrib_num (ATTRIB_QUICK_KILL_CASE, scope, num);
  952. !                     break;
  953. !                 }
  954. !                 if (match_boolean (line, "quick_kill_expire=", &num)) {
  955. !                     set_attrib_num (ATTRIB_QUICK_KILL_EXPIRE, scope, num);
  956. !                     break;
  957. !                 }
  958. !                 if (match_integer (line, "quick_select_header=", &num)) {
  959. !                     set_attrib_num (ATTRIB_QUICK_SELECT_HEADER, scope, num);
  960. !                     break;
  961. !                 }
  962. !                 if (match_string (line, "quick_select_scope=", buf, sizeof (buf))) {
  963. !                     set_attrib_str (ATTRIB_QUICK_SELECT_SCOPE, scope, buf);
  964. !                     break;
  965. !                 }
  966. !                 if (match_boolean (line, "quick_select_case=", &num)) {
  967. !                     set_attrib_num (ATTRIB_QUICK_SELECT_CASE, scope, num);
  968. !                     break;
  969. !                 }
  970. !                 if (match_boolean (line, "quick_select_expire=", &num)) {
  971. !                     set_attrib_num (ATTRIB_QUICK_SELECT_EXPIRE, scope, num);
  972. !                     break;
  973. !                 }
  974. !                 break;
  975. !             case 's':
  976. !                 if (match_string (line, "savedir=", buf, sizeof (buf))) {
  977. !                     set_attrib_str (ATTRIB_SAVEDIR, scope, buf);
  978. !                     break;
  979. !                 }
  980. !                 if (match_string (line, "savefile=", buf, sizeof (buf))) {
  981. !                     set_attrib_str (ATTRIB_SAVEFILE, scope, buf);
  982. !                     break;
  983. !                 }
  984. !                 if (match_string (line, "sigfile=", buf, sizeof (buf))) {
  985. !                     set_attrib_str (ATTRIB_SIGFILE, scope, buf);
  986. !                     break;
  987. !                 }
  988. !                 if (match_string (line, "scope=", scope, sizeof (scope))) {
  989. !                     break;
  990. !                 }
  991. !                 if (match_boolean (line, "show_only_unread=", &num)) {
  992. !                     set_attrib_num (ATTRIB_SHOW_ONLY_UNREAD, scope, num);
  993. !                     break;
  994. !                 }
  995. !                 if (match_integer (line, "sort_art_type=", &num)) {
  996. !                     set_attrib_num (ATTRIB_SORT_ART_TYPE, scope, num);
  997. !                     break;
  998. !                 }
  999. !                 if (match_integer (line, "show_author=", &num)) {
  1000. !                     set_attrib_num (ATTRIB_SHOW_AUTHOR, scope, num);
  1001. !                     break;
  1002. !                 }
  1003. !                 break;
  1004. !             case 't':
  1005. !                 if (match_boolean (line, "thread_arts=", &num)) {
  1006. !                     set_attrib_num (ATTRIB_THREAD_ARTS, scope, num);
  1007. !                     break;
  1008. !                 }
  1009. !                 break;
  1010. !             case 'x':
  1011. !                 if (match_string (line, "x_headers=", buf, sizeof (buf))) {
  1012. !                     set_attrib_str (ATTRIB_X_HEADERS, scope, buf);
  1013. !                     break;
  1014. !                 }
  1015. !                 if (match_string (line, "x_body=", buf, sizeof (buf))) {
  1016. !                     set_attrib_str (ATTRIB_X_BODY, scope, buf);
  1017. !                     break;
  1018. !                 }
  1019. !                 break;
  1020.               }
  1021.           }
  1022.           fclose (fp);
  1023. diff -cr 950726/src/config.c 950726.new/src/config.c
  1024. *** 950726/src/config.c    Mon Jun 19 03:35:00 1995
  1025. --- 950726.new/src/config.c    Fri Jul 28 06:19:49 1995
  1026. ***************
  1027. *** 48,317 ****
  1028.       while (fgets (buf, sizeof (buf), fp) != (char *) 0) {
  1029.           if (buf[0] == '#' || buf[0] == '\n') { 
  1030.               continue;
  1031. -         }    
  1032. -         if (match_boolean (buf, "auto_save=", &default_auto_save)) {
  1033. -             continue;
  1034.           }
  1035. !         if (match_boolean (buf, "batch_save=", &default_batch_save)) {
  1036. !             continue;
  1037. !         }
  1038. !         if (match_boolean (buf, "start_editor_offset=", &start_editor_offset)) {
  1039. !             continue;
  1040. !         }    
  1041. !         if (match_string (buf, "default_editor_format=", default_editor_format, sizeof (default_editor_format))) {
  1042. !             continue;
  1043. !         }
  1044. !         if (match_string (buf, "default_mailer_format=", default_mailer_format, sizeof (default_mailer_format))) {
  1045. !             continue;
  1046. !         }
  1047. !         if (match_boolean (buf, "mark_saved_read=", &mark_saved_read)) {
  1048. !             continue;
  1049. !         }    
  1050. !         if (match_boolean (buf, "inverse_okay=", &inverse_okay)) {
  1051. !             continue;
  1052. !         }    
  1053. !         if (match_boolean (buf, "draw_arrow=", &draw_arrow_mark)) {
  1054. !             continue;
  1055. !         }    
  1056. !         if (match_boolean (buf, "print_header=", &print_header)) {
  1057. !             continue;
  1058. !         }
  1059. !         if (match_boolean (buf, "pos_first_unread=", &pos_first_unread)) {
  1060. !             continue;
  1061. !         }    
  1062. !         if (match_boolean (buf, "full_page_scroll=", &full_page_scroll)) {
  1063. !             continue;
  1064. !         }    
  1065. !         if (match_boolean (buf, "catchup_read_groups=", &catchup_read_groups)) {
  1066. !             continue;
  1067. !         }    
  1068. !         if (match_boolean (buf, "thread_articles=", &default_thread_arts)) {
  1069. !             continue;
  1070. !         }    
  1071. !         if (match_boolean (buf, "unlink_article=", &unlink_article)) {
  1072. !             continue;
  1073. !         }    
  1074. !         if (match_boolean (buf, "show_only_unread_groups=", &show_only_unread_groups)) {
  1075. !             continue;
  1076. !         }
  1077. !         if (match_boolean (buf, "show_only_unread=", &default_show_only_unread)) {
  1078. !             continue;
  1079. !         }
  1080. !         if (match_boolean (buf, "confirm_action=", &confirm_action)) {
  1081. !             continue;
  1082. !         }
  1083. !         if (match_boolean (buf, "confirm_to_quit=", &confirm_to_quit)) {
  1084. !             continue;
  1085. !         }
  1086. !         if (match_boolean (buf, "show_description=", &show_description)) {
  1087. !             continue;
  1088. !         }
  1089. !         if (match_integer (buf, "show_author=", &default_show_author)) {
  1090. !             continue;
  1091. !         }    
  1092. !         if (match_integer (buf, "post_process_type=", &default_post_proc_type)) {
  1093. !             proc_ch_default = get_post_proc_type (default_post_proc_type);
  1094. !             continue;
  1095. !         }    
  1096. !         if (match_integer (buf, "sort_article_type=", &default_sort_art_type)) {
  1097. !             continue;
  1098. !         }    
  1099. !         if (match_string (buf, "default_savedir=", default_savedir, sizeof (default_savedir))) {
  1100. !             if (default_savedir[0] == '.' && strlen (default_savedir) == 1) {
  1101. !                 get_cwd (buf);
  1102. !                 my_strncpy (default_savedir, buf, sizeof (default_savedir));
  1103.               }
  1104. !             continue;
  1105. !         }    
  1106. !         if (match_string (buf, "default_maildir=", default_maildir, sizeof (default_maildir))) {
  1107. !             continue;
  1108. !         }
  1109. !         if (match_string (buf, "default_printer=", default_printer, sizeof (default_printer))) {
  1110. !             continue;
  1111. !         }
  1112. !         if (match_string (buf, "default_sigfile=", default_sigfile, sizeof (default_sigfile))) {
  1113. !             continue;
  1114. !         }
  1115. !         if (match_string (buf, "quote_chars=", quote_chars, sizeof (quote_chars))) {
  1116. !             quote_dash_to_space (quote_chars);
  1117. !             continue;
  1118. !         }
  1119. !         if (match_string (buf, "art_marked_deleted=", buf, sizeof (buf))) {
  1120. !             art_marked_deleted = buf[0];
  1121. !             continue;
  1122. !         }
  1123. !         if (match_string (buf, "art_marked_inrange=", buf, sizeof (buf))) {
  1124. !             art_marked_inrange = buf[0];
  1125. !             continue;
  1126. !         }
  1127. !         if (match_string (buf, "art_marked_return=", buf, sizeof (buf))) {
  1128. !             art_marked_return = buf[0];
  1129. !             continue;
  1130. !         }
  1131. !         if (match_string (buf, "art_marked_selected=", buf, sizeof (buf))) {
  1132. !             art_marked_selected = buf[0];
  1133. !             continue;
  1134. !         }
  1135. !         if (match_string (buf, "art_marked_unread=", buf, sizeof (buf))) {
  1136. !             art_marked_unread = buf[0];
  1137. !             continue;
  1138. !         }
  1139. !         if (match_integer (buf, "reread_active_file_secs=", &reread_active_file_secs)) {
  1140. !             continue;
  1141. !         }
  1142. !         if (match_boolean (buf, "show_last_line_prev_page=", &show_last_line_prev_page)) {
  1143. !             continue;
  1144. !         }
  1145. !         if (match_boolean (buf, "tab_after_X_selection=", &tab_after_X_selection)) {
  1146. !             continue;
  1147. !         }
  1148. !         if (match_boolean (buf, "tab_goto_next_unread=", &tab_goto_next_unread)) {
  1149. !             continue;
  1150. !         }
  1151. !         if (match_boolean (buf, "force_screen_redraw=", &force_screen_redraw)) {
  1152. !             continue;
  1153. !         }
  1154. !         if (match_boolean (buf, "save_to_mmdf_mailbox=", &save_to_mmdf_mailbox)) {
  1155. !             continue;
  1156. !         }
  1157. !         if (match_boolean (buf, "use_builtin_inews=", &use_builtin_inews)) {
  1158. !             continue;
  1159. !         }
  1160. !         if (match_string (buf, "news_quote_format=", news_quote_format, sizeof (news_quote_format))) {
  1161. !             continue;
  1162. !         }
  1163. !         if (match_string (buf, "mail_quote_format=", mail_quote_format, sizeof (mail_quote_format))) {
  1164. !             continue;
  1165. !         }
  1166. !         if (match_boolean (buf, "use_mouse=", &use_mouse)) {
  1167. !             continue;
  1168. !         }
  1169.   #ifdef HAVE_KEYPAD
  1170. !         if (match_boolean (buf, "use_keypad=", &use_keypad)) {
  1171. !             continue;
  1172. !         }
  1173.   #endif
  1174. !         if (match_boolean (buf, "strip_blanks=", &strip_blanks)) {
  1175. !             continue;
  1176. !         }
  1177. !         if (match_integer (buf, "groupname_max_length=", &groupname_max_length)) {
  1178. !             continue;
  1179. !         }
  1180. !         if (match_boolean (buf, "beginner_level=", &beginner_level)) {
  1181. !             continue;
  1182. !         }
  1183. !         if (match_boolean (buf, "auto_cc=", &auto_cc)) {
  1184. !             continue;
  1185. !         }
  1186. !         if (match_boolean (buf, "xcut_and_paste=", &xcut_and_paste)) {
  1187. !             continue;
  1188. !         }
  1189. !         if (match_boolean (buf, "group_catchup_on_exit=", &group_catchup_on_exit)) {
  1190. !             continue;
  1191. !         }
  1192. !         if (match_boolean (buf, "thread_catchup_on_exit=", &thread_catchup_on_exit)) {
  1193. !             continue;
  1194. !         }
  1195. !         if (match_boolean (buf, "auto_list_thread=", &auto_list_thread)) {
  1196. !             continue;
  1197. !         }
  1198. !         if (match_boolean (buf, "process_only_unread=", &process_only_unread)) {
  1199. !             continue;
  1200. !         }
  1201. !         if (match_boolean (buf, "use_metamail=", &use_metamail)) {
  1202. !             continue;
  1203. !         }
  1204. !         if (match_integer (buf, "default_filter_days=", &default_filter_days)) {
  1205. !             continue;
  1206. !         }
  1207. !         if (match_integer (buf, "default_filter_kill_header=", &default_filter_kill_header)) {
  1208. !             continue;
  1209. !         }
  1210. !         if (match_boolean (buf, "default_filter_kill_global=", &default_filter_kill_global)) {
  1211. !             continue;
  1212. !         }
  1213. !         if (match_boolean (buf, "default_filter_kill_case=", &default_filter_kill_case)) {
  1214. !             continue;
  1215. !         }
  1216. !         if (match_boolean (buf, "default_filter_kill_expire=", &default_filter_kill_expire)) {
  1217. !             continue;
  1218. !         }
  1219. !         if (match_integer (buf, "default_filter_select_header=", &default_filter_select_header)) {
  1220. !             continue;
  1221. !         }
  1222. !         if (match_boolean (buf, "default_filter_select_global=", &default_filter_select_global)) {
  1223. !             continue;
  1224. !         }
  1225. !         if (match_boolean (buf, "default_filter_select_case=", &default_filter_select_case)) {
  1226. !             continue;
  1227. !         }
  1228. !         if (match_boolean (buf, "default_filter_select_expire=", &default_filter_select_expire)) {
  1229. !             continue;
  1230. !         }
  1231. !         if (match_string (buf, "default_save_mode=", buf, sizeof (buf))) {
  1232. !             default_save_mode = buf[0];
  1233. !             continue;
  1234. !         }
  1235. !         if (match_string (buf, "default_author_search=", default_author_search, sizeof (default_author_search))) {
  1236. !             continue;
  1237. !         }
  1238. !         if (match_string (buf, "default_goto_group=", default_goto_group, sizeof (default_goto_group))) {
  1239. !             continue;
  1240. !         }
  1241. !         if (match_string (buf, "default_group_search=", default_group_search, sizeof (default_group_search))) {
  1242. !             continue;
  1243. !         }
  1244. !         if (match_string (buf, "default_subject_search=", default_subject_search, sizeof (default_subject_search))) {
  1245. !             continue;
  1246. !         }
  1247. !         if (match_string (buf, "default_art_search=", default_art_search, sizeof (default_art_search))) {
  1248. !             continue;
  1249. !         }
  1250. !         if (match_string (buf, "default_repost_group=", default_repost_group, sizeof (default_repost_group))) {
  1251. !             continue;
  1252. !         }
  1253. !         if (match_string (buf, "default_mail_address=", default_mail_address, sizeof (default_mail_address))) {
  1254. !             continue;
  1255. !         }
  1256. !         if (match_integer (buf, "default_move_group=", &default_move_group)) {
  1257. !             continue;
  1258. !         }
  1259. !         if (match_string (buf, "default_pipe_command=", default_pipe_command, sizeof (default_pipe_command))) {
  1260. !             continue;
  1261. !         }
  1262. !         if (match_string (buf, "default_post_newsgroups=", default_post_newsgroups, sizeof (default_post_newsgroups))) {
  1263. !             continue;
  1264. !         }
  1265. !         if (match_string (buf, "default_post_subject=", default_post_subject, sizeof (default_post_subject))) {
  1266. !             continue;
  1267. !         }
  1268. !         if (match_string (buf, "default_regex_pattern=", default_regex_pattern, sizeof (default_regex_pattern))) {
  1269. !             continue;
  1270. !         }
  1271. !         if (match_string (buf, "default_range_group=", default_range_group, sizeof (default_range_group))) {
  1272. !             continue;
  1273. !         }
  1274. !         if (match_string (buf, "default_range_select=", default_range_select, sizeof (default_range_select))) {
  1275. !             continue;
  1276. !         }
  1277. !         if (match_string (buf, "default_range_thread=", default_range_thread, sizeof (default_range_thread))) {
  1278. !             continue;
  1279. !         }
  1280. !         if (match_string (buf, "default_save_file=", default_save_file, sizeof (default_save_file))) {
  1281. !             continue;
  1282. !         }
  1283. !         if (match_string (buf, "default_select_pattern=", default_select_pattern, sizeof (default_select_pattern))) {
  1284. !             continue;
  1285. !         }
  1286. !         if (match_string (buf, "default_shell_command=", default_shell_command, sizeof (default_shell_command))) {
  1287. !             continue;
  1288. !         }
  1289. !         if (match_string (buf, "motd_file_info=", motd_file_info, sizeof (motd_file_info))) {
  1290. !             continue;
  1291. !         }
  1292. !         if (match_string (buf, "newnews=", newnews_info, sizeof (newnews_info))) {
  1293. !             load_newnews_info (newnews_info);
  1294. !             continue;
  1295.           }
  1296.       }
  1297.       fclose (fp);
  1298. --- 48,361 ----
  1299.       while (fgets (buf, sizeof (buf), fp) != (char *) 0) {
  1300.           if (buf[0] == '#' || buf[0] == '\n') { 
  1301.               continue;
  1302.           }
  1303. !         switch(tolower(buf[0])) {
  1304. !         case 'a':
  1305. !             if (match_boolean (buf, "auto_save=", &default_auto_save)) {
  1306. !                 break;
  1307.               }
  1308. !             if (match_string (buf, "art_marked_deleted=", buf, sizeof (buf))) {
  1309. !                 art_marked_deleted = buf[0];
  1310. !                 break;
  1311. !             }
  1312. !             if (match_string (buf, "art_marked_inrange=", buf, sizeof (buf))) {
  1313. !                 art_marked_inrange = buf[0];
  1314. !                 break;
  1315. !             }
  1316. !             if (match_string (buf, "art_marked_return=", buf, sizeof (buf))) {
  1317. !                 art_marked_return = buf[0];
  1318. !                 break;
  1319. !             }
  1320. !             if (match_string (buf, "art_marked_selected=", buf, sizeof (buf))) {
  1321. !                 art_marked_selected = buf[0];
  1322. !                 break;
  1323. !             }
  1324. !             if (match_string (buf, "art_marked_unread=", buf, sizeof (buf))) {
  1325. !                 art_marked_unread = buf[0];
  1326. !                 break;
  1327. !             }
  1328. ! #ifdef HAVE_METAMAIL
  1329. !             if (match_boolean (buf, "ask_for_metamail=", &ask_for_metamail)) {
  1330. !                 break;
  1331. !             }
  1332. ! #endif
  1333. !             if (match_boolean (buf, "auto_cc=", &auto_cc)) {
  1334. !                 break;
  1335. !             }
  1336. !             if (match_boolean (buf, "auto_list_thread=", &auto_list_thread)) {
  1337. !                 break;
  1338. !             }
  1339. !             break;
  1340. !         case 'b':
  1341. !             if (match_boolean (buf, "batch_save=", &default_batch_save)) {
  1342. !                 break;
  1343. !             }
  1344. !             if (match_boolean (buf, "beginner_level=", &beginner_level)) {
  1345. !                 break;
  1346. !             }
  1347. !             break;
  1348. !         case 'c':
  1349. !             if (match_boolean (buf, "catchup_read_groups=", &catchup_read_groups)) {
  1350. !                 break;
  1351. !             }
  1352. !             if (match_boolean (buf, "confirm_action=", &confirm_action)) {
  1353. !                 break;
  1354. !             }
  1355. !             if (match_boolean (buf, "confirm_to_quit=", &confirm_to_quit)) {
  1356. !                 break;
  1357. !             }
  1358. !             break;
  1359. !         case 'd':
  1360. !             if (match_string (buf, "default_editor_format=", default_editor_format, sizeof (default_editor_format))) {
  1361. !                 break;
  1362. !             }
  1363. !             if (match_string (buf, "default_mailer_format=", default_mailer_format, sizeof (default_mailer_format))) {
  1364. !                 break;
  1365. !             }
  1366. !             if (match_string (buf, "default_savedir=", default_savedir, sizeof (default_savedir))) {
  1367. !                 if (default_savedir[0] == '.' && strlen (default_savedir) == 1) {
  1368. !                     get_cwd (buf);
  1369. !                     my_strncpy (default_savedir, buf, sizeof (default_savedir));
  1370. !                 }
  1371. !                 break;
  1372. !             }    
  1373. !             if (match_string (buf, "default_maildir=", default_maildir, sizeof (default_maildir))) {
  1374. !                 break;
  1375. !             }
  1376. !             if (match_string (buf, "default_printer=", default_printer, sizeof (default_printer))) {
  1377. !                 break;
  1378. !             }
  1379. !             if (match_string (buf, "default_sigfile=", default_sigfile, sizeof (default_sigfile))) {
  1380. !                 break;
  1381. !             }
  1382. !             if (match_integer (buf, "default_filter_days=", &default_filter_days)) {
  1383. !                 break;
  1384. !             }
  1385. !             if (match_integer (buf, "default_filter_kill_header=", &default_filter_kill_header)) {
  1386. !                 break;
  1387. !             }
  1388. !             if (match_boolean (buf, "default_filter_kill_global=", &default_filter_kill_global)) {
  1389. !                 break;
  1390. !             }
  1391. !             if (match_boolean (buf, "default_filter_kill_case=", &default_filter_kill_case)) {
  1392. !                 break;
  1393. !             }
  1394. !             if (match_boolean (buf, "default_filter_kill_expire=", &default_filter_kill_expire)) {
  1395. !                 break;
  1396. !             }
  1397. !             if (match_integer (buf, "default_filter_select_header=", &default_filter_select_header)) {
  1398. !                 break;
  1399. !             }
  1400. !             if (match_boolean (buf, "default_filter_select_global=", &default_filter_select_global)) {
  1401. !                 break;
  1402. !             }
  1403. !             if (match_boolean (buf, "default_filter_select_case=", &default_filter_select_case)) {
  1404. !                 break;
  1405. !             }
  1406. !             if (match_boolean (buf, "default_filter_select_expire=", &default_filter_select_expire)) {
  1407. !                 break;
  1408. !             }
  1409. !             if (match_string (buf, "default_save_mode=", buf, sizeof (buf))) {
  1410. !                 default_save_mode = buf[0];
  1411. !                 break;
  1412. !             }
  1413. !             if (match_string (buf, "default_author_search=", default_author_search, sizeof (default_author_search))) {
  1414. !                 break;
  1415. !             }
  1416. !             if (match_string (buf, "default_goto_group=", default_goto_group, sizeof (default_goto_group))) {
  1417. !                 break;
  1418. !             }
  1419. !             if (match_string (buf, "default_group_search=", default_group_search, sizeof (default_group_search))) {
  1420. !                 break;
  1421. !             }
  1422. !             if (match_string (buf, "default_subject_search=", default_subject_search, sizeof (default_subject_search))) {
  1423. !                 break;
  1424. !             }
  1425. !             if (match_string (buf, "default_art_search=", default_art_search, sizeof (default_art_search))) {
  1426. !                 break;
  1427. !             }
  1428. !             if (match_string (buf, "default_repost_group=", default_repost_group, sizeof (default_repost_group))) {
  1429. !                 break;
  1430. !             }
  1431. !             if (match_string (buf, "default_mail_address=", default_mail_address, sizeof (default_mail_address))) {
  1432. !                 break;
  1433. !             }
  1434. !             if (match_integer (buf, "default_move_group=", &default_move_group)) {
  1435. !                 break;
  1436. !             }
  1437. !             if (match_string (buf, "default_pipe_command=", default_pipe_command, sizeof (default_pipe_command))) {
  1438. !                 break;
  1439. !             }
  1440. !             if (match_string (buf, "default_post_newsgroups=", default_post_newsgroups, sizeof (default_post_newsgroups))) {
  1441. !                 break;
  1442. !             }
  1443. !             if (match_string (buf, "default_post_subject=", default_post_subject, sizeof (default_post_subject))) {
  1444. !                 break;
  1445. !             }
  1446. !             if (match_string (buf, "default_regex_pattern=", default_regex_pattern, sizeof (default_regex_pattern))) {
  1447. !                 break;
  1448. !             }
  1449. !             if (match_string (buf, "default_range_group=", default_range_group, sizeof (default_range_group))) {
  1450. !                 break;
  1451. !             }
  1452. !             if (match_string (buf, "default_range_select=", default_range_select, sizeof (default_range_select))) {
  1453. !                 break;
  1454. !             }
  1455. !             if (match_string (buf, "default_range_thread=", default_range_thread, sizeof (default_range_thread))) {
  1456. !                 break;
  1457. !             }
  1458. !             if (match_string (buf, "default_save_file=", default_save_file, sizeof (default_save_file))) {
  1459. !                 break;
  1460. !             }
  1461. !             if (match_string (buf, "default_select_pattern=", default_select_pattern, sizeof (default_select_pattern))) {
  1462. !                 break;
  1463. !             }
  1464. !             if (match_string (buf, "default_shell_command=", default_shell_command, sizeof (default_shell_command))) {
  1465. !                 break;
  1466. !             }
  1467. !             if (match_boolean (buf, "draw_arrow=", &draw_arrow_mark)) {
  1468. !                 break;
  1469. !             }
  1470. !             break;
  1471. !         case 'f':
  1472. !             if (match_boolean (buf, "full_page_scroll=", &full_page_scroll)) {
  1473. !                 break;
  1474. !             }
  1475. !             if (match_boolean (buf, "force_screen_redraw=", &force_screen_redraw)) {
  1476. !                 break;
  1477. !             }
  1478. !             break;
  1479. !         case 'g':
  1480. !             if (match_integer (buf, "groupname_max_length=", &groupname_max_length)) {
  1481. !                 break;
  1482. !             }
  1483. !             if (match_boolean (buf, "group_catchup_on_exit=", &group_catchup_on_exit)) {
  1484. !                 break;
  1485. !             }
  1486. !             break;
  1487. !         case 'i':
  1488. !             if (match_boolean (buf, "inverse_okay=", &inverse_okay)) {
  1489. !                 break;
  1490. !             }
  1491. !             break;
  1492. !         case 'm':
  1493. !             if (match_string (buf, "motd_file_info=", motd_file_info, sizeof (motd_file_info))) {
  1494. !                 break;
  1495. !             }
  1496. !             if (match_boolean (buf, "mark_saved_read=", &mark_saved_read)) {
  1497. !                 break;
  1498. !             }
  1499. !             if (match_string (buf, "mail_quote_format=", mail_quote_format, sizeof (mail_quote_format))) {
  1500. !                 break;
  1501. !             }
  1502. !             break;
  1503. !         case 'n':
  1504. !             if (match_string (buf, "newnews=", newnews_info, sizeof (newnews_info))) {
  1505. !                 load_newnews_info (newnews_info);
  1506. !                 break;
  1507. !             }
  1508. !             if (match_string (buf, "news_quote_format=", news_quote_format, sizeof (news_quote_format))) {
  1509. !                 break;
  1510. !             }
  1511. !             break;
  1512. !         case 'p':
  1513. !             if (match_boolean (buf, "print_header=", &print_header)) {
  1514. !                 break;
  1515. !             }
  1516. !             if (match_boolean (buf, "pos_first_unread=", &pos_first_unread)) {
  1517. !                 break;
  1518. !             }    
  1519. !             if (match_integer (buf, "post_process_type=", &default_post_proc_type)) {
  1520. !                 proc_ch_default = get_post_proc_type (default_post_proc_type);
  1521. !                 break;
  1522. !             }    
  1523. !             if (match_boolean (buf, "process_only_unread=", &process_only_unread)) {
  1524. !                 break;
  1525. !             }
  1526. !             break;
  1527. !         case 'q':
  1528. !             if (match_string (buf, "quote_chars=", quote_chars, sizeof (quote_chars))) {
  1529. !                 quote_dash_to_space (quote_chars);
  1530. !                 break;
  1531. !             }
  1532. !             break;
  1533. !         case 'r':
  1534. !             if (match_integer (buf, "reread_active_file_secs=", &reread_active_file_secs)) {
  1535. !                 break;
  1536. !             }
  1537. !             break;
  1538. !         case 's':
  1539. !             if (match_boolean (buf, "sigdashes=", &sigdashes)) {
  1540. !                 break;
  1541. !             }
  1542. !             if (match_boolean (buf, "start_editor_offset=", &start_editor_offset)) {
  1543. !                 break;
  1544. !             }
  1545. !             if (match_boolean (buf, "show_only_unread_groups=", &show_only_unread_groups)) {
  1546. !                 break;
  1547. !             }
  1548. !             if (match_boolean (buf, "show_only_unread=", &default_show_only_unread)) {
  1549. !                 break;
  1550. !             }
  1551. !             if (match_boolean (buf, "show_description=", &show_description)) {
  1552. !                 break;
  1553. !             }
  1554. !             if (match_integer (buf, "show_author=", &default_show_author)) {
  1555. !                 break;
  1556. !             }    
  1557. !             if (match_integer (buf, "sort_article_type=", &default_sort_art_type)) {
  1558. !                 break;
  1559. !             }    
  1560. !             if (match_boolean (buf, "show_last_line_prev_page=", &show_last_line_prev_page)) {
  1561. !                 break;
  1562. !             }
  1563. !             if (match_boolean (buf, "save_to_mmdf_mailbox=", &save_to_mmdf_mailbox)) {
  1564. !                 break;
  1565. !             }
  1566. !             if (match_boolean (buf, "strip_blanks=", &strip_blanks)) {
  1567. !                 break;
  1568. !             }
  1569. !             break;
  1570. !         case 't':
  1571. !             if (match_boolean (buf, "thread_articles=", &default_thread_arts)) {
  1572. !                 break;
  1573. !             }    
  1574. !             if (match_boolean (buf, "tab_after_X_selection=", &tab_after_X_selection)) {
  1575. !                 break;
  1576. !             }
  1577. !             if (match_boolean (buf, "tab_goto_next_unread=", &tab_goto_next_unread)) {
  1578. !                 break;
  1579. !             }
  1580. !             if (match_boolean (buf, "thread_catchup_on_exit=", &thread_catchup_on_exit)) {
  1581. !                 break;
  1582. !             }
  1583. !             break;
  1584. !         case 'u':
  1585. !             if (match_boolean (buf, "unlink_article=", &unlink_article)) {
  1586. !                 break;
  1587. !             }    
  1588. !             if (match_boolean (buf, "use_builtin_inews=", &use_builtin_inews)) {
  1589. !                 break;
  1590. !             }
  1591. !             if (match_boolean (buf, "use_mouse=", &use_mouse)) {
  1592. !                 break;
  1593. !             }
  1594.   #ifdef HAVE_KEYPAD
  1595. !             if (match_boolean (buf, "use_keypad=", &use_keypad)) {
  1596. !                 break;
  1597. !             }
  1598.   #endif
  1599. ! #ifdef HAVE_METAMAIL
  1600. !             if (match_boolean (buf, "use_metamail=", &use_metamail)) {
  1601. !                 break;
  1602. !             }
  1603. !             break;
  1604. ! #endif
  1605. !         case 'x':
  1606. !             if (match_boolean (buf, "xcut_and_paste=", &xcut_and_paste)) {
  1607. !                 break;
  1608. !             }
  1609. !             break;
  1610.           }
  1611.       }
  1612.       fclose (fp);
  1613. ***************
  1614. *** 375,380 ****
  1615. --- 419,431 ----
  1616.       fprintf (fp, "pos_first_unread=%s\n\n", print_boolean (pos_first_unread));
  1617.       fprintf (fp, "# if ON scroll full page of groups/articles otherwise half a page\n");
  1618.       fprintf (fp, "full_page_scroll=%s\n\n", print_boolean (full_page_scroll));
  1619. + #ifdef HAVE_METAMAIL
  1620. +      fprintf (fp, "# if ON metamail can/will be used to display MIME articles\n");
  1621. +      fprintf (fp, "use_metamail=%s\n\n", print_boolean (use_metamail));
  1622. +      fprintf (fp, "# if ON tin will ask before using metamail to display MIME messages\n");
  1623. +      fprintf (fp, "# this only occurs, if use_metamail is also switched ON\n");
  1624. +      fprintf (fp, "ask_for_metamail=%s\n\n", print_boolean (ask_for_metamail));
  1625. + #endif
  1626.       fprintf (fp, "# if ON ask user if read groups should all be marked read\n");
  1627.       fprintf (fp, "catchup_read_groups=%s\n\n", print_boolean (catchup_read_groups));
  1628.       fprintf (fp, "# if ON confirm certain commands with y/n before executing\n");
  1629. ***************
  1630. *** 414,419 ****
  1631. --- 465,472 ----
  1632.       fprintf (fp, "default_printer=%s\n\n", default_printer);
  1633.       fprintf (fp, "# Signature path (random sigs)/file to be used when posting/replying to messages\n");
  1634.       fprintf (fp, "default_sigfile=%s\n\n", default_sigfile);
  1635. +     fprintf (fp, "# if ON prepend the signature with dashes '\\n-- \\n'\n");
  1636. +     fprintf (fp, "sigdashes=%s\n\n", print_boolean (sigdashes));
  1637.       fprintf (fp, "# time interval in seconds between rereading the active file\n");
  1638.       fprintf (fp, "reread_active_file_secs=%d\n\n", reread_active_file_secs);
  1639.       fprintf (fp, "# characters used in quoting to followups and replys. '_' replaced by ' '\n");
  1640. ***************
  1641. *** 470,477 ****
  1642.       fprintf (fp, "process_only_unread=%s\n\n", print_boolean (process_only_unread));
  1643.       fprintf (fp, "# Num of days a short term filter will be active\n");
  1644.       fprintf (fp, "default_filter_days=%d\n\n", default_filter_days);
  1645. -     fprintf (fp, "# If OFF never ask if you want to use MetaMail\n");
  1646. -     fprintf (fp, "use_metamail=%s\n\n", print_boolean (use_metamail));
  1647.   
  1648.       fprintf (fp, "# Defaults for quick (1 key) kill & auto-selection filters\n");
  1649.       fprintf (fp, "# header=NUM  0=Subject: 1=From: 2=Message-Id:\n");
  1650. --- 523,528 ----
  1651. diff -cr 950726/src/curses.c 950726.new/src/curses.c
  1652. *** 950726/src/curses.c    Fri Jul 28 05:20:28 1995
  1653. --- 950726.new/src/curses.c    Fri Jul 28 06:37:44 1995
  1654. ***************
  1655. *** 817,822 ****
  1656. --- 817,823 ----
  1657.   #endif /* M_OS2 */
  1658.   
  1659.   #ifdef M_AMIGA
  1660. + #include <sprof.h>
  1661.   
  1662.   static int new_lines, new_columns;
  1663.   
  1664. ***************
  1665. *** 831,837 ****
  1666. --- 832,840 ----
  1667.       unsigned char ch;
  1668.   
  1669.       while (getscrsize || buflen == 0) {
  1670. + PROFILE_OFF();
  1671.           result = read (0, (char *)&buf[buflen], 1);
  1672. + PROFILE_ON();
  1673.           if (result <= 0) return EOF;
  1674.           buflen++;
  1675.           if (buf[bufp] == KEY_PREFIX) {
  1676. diff -cr 950726/src/filter.c 950726.new/src/filter.c
  1677. *** 950726/src/filter.c    Thu Dec 22 02:19:12 1994
  1678. --- 950726.new/src/filter.c    Fri Jul 28 06:41:34 1995
  1679. ***************
  1680. *** 203,308 ****
  1681.           if (*buf == '#' || *buf == '\n') {
  1682.               continue;
  1683.           }
  1684. !         if (match_string (buf, "scope=", scope, sizeof (scope))) {
  1685. ! if (debug) {
  1686. !     printf ("scope=[%s] num=[%d]\n", scope, glob_filter.num);
  1687. !     fflush (stdout);
  1688. ! }
  1689. !             global = TRUE;
  1690. !             arr_num = &glob_filter.num;
  1691. !             arr_max = &glob_filter.max;
  1692. !             if (*arr_num >= (*arr_max - 1)) {
  1693. !                 glob_filter.filter = psExpandFilterArray (
  1694. !                     glob_filter.filter, arr_max);
  1695. !             }
  1696. !             arr_ptr = glob_filter.filter;
  1697. !             i = *arr_num;
  1698. !             (*arr_num)++;
  1699. !             vSetFilter (&arr_ptr[i]);
  1700. !             expired_time = FALSE;
  1701. !             arr_ptr[i].scope = str_dup (scope);
  1702. !             subj[0] = '\0';
  1703. !             from[0] = '\0';
  1704. !             msgid[0] = '\0';
  1705. !             lines[0] = '\0';
  1706. !             icase = 0;
  1707. !             secs = 0L;
  1708. !             psGrp = (struct t_group *) 0;    /* fudge for out of order rules */
  1709. !             continue;
  1710. !         }
  1711. !         if (match_string (buf, "group=", group, sizeof (group))) {
  1712.   if (debug) {
  1713.       printf ("group=[%s]\n", group);
  1714.       fflush (stdout);
  1715.   }
  1716. !             psGrp = psGrpFind (group);
  1717. !             if (psGrp != (struct t_group *) 0) {    /* switch to group filter */
  1718. !                 global = FALSE;
  1719. !                 if (psGrp->grps_filter == (struct t_filters *) 0) {
  1720.   if (debug) {
  1721.       printf ("Allocating grp_filter for group=[%s]\n", psGrp->name);
  1722.       fflush (stdout);
  1723.   }
  1724. !                     psGrp->grps_filter = 
  1725. !                         (struct t_filters *) my_malloc (sizeof (struct t_filters));
  1726. !                     psGrp->grps_filter->num = 0;
  1727. !                     psGrp->grps_filter->max = 0;
  1728. !                     psGrp->grps_filter->filter = (struct t_filter *) 0;
  1729. !                 }
  1730. !             }
  1731. !             subj[0] = '\0';
  1732. !             from[0] = '\0';
  1733. !             msgid[0] = '\0';
  1734. !             lines[0] = '\0';
  1735. !             secs = 0L;
  1736. !             continue;
  1737. !         }
  1738. !         if (match_integer (buf, "type=", &type)) {
  1739.   if (debug) {
  1740. !     printf ("type=[%d][%s]\n", type, (type == 0 ? "KILL" : "SELECT"));
  1741.       fflush (stdout);
  1742.   }
  1743. !             if (psGrp && ! global) {
  1744. !                 arr_num = &psGrp->grps_filter->num;
  1745. !                 arr_max = &psGrp->grps_filter->max;
  1746.                   if (*arr_num >= (*arr_max - 1)) {
  1747. !                     psGrp->grps_filter->filter = psExpandFilterArray (
  1748. !                         psGrp->grps_filter->filter, arr_max);
  1749.                   }
  1750. !                 arr_ptr = psGrp->grps_filter->filter;
  1751.                   i = *arr_num;
  1752.                   (*arr_num)++;
  1753.                   vSetFilter (&arr_ptr[i]);
  1754.                   expired_time = FALSE;
  1755. ! if (debug) {
  1756. !     printf ("grp_filter num=[%d] max=[%d]\n", *arr_num, *arr_max);
  1757. !     fflush (stdout);
  1758. ! }
  1759.                   subj[0] = '\0';
  1760.                   from[0] = '\0';
  1761.                   msgid[0] = '\0';
  1762.                   lines[0] = '\0';
  1763.                   secs = 0L;
  1764.               }
  1765. !             if (arr_ptr) {
  1766. !                 arr_ptr[i].type = type;
  1767. !             }
  1768. !             continue;
  1769. !         }
  1770. !         if (match_integer (buf, "case=", &icase)) {
  1771. !             if (arr_ptr && ! expired_time) {
  1772. !                 arr_ptr[i].icase = icase;
  1773. !             }
  1774. !             continue;
  1775. !         }
  1776. !         if (match_string (buf, "subj=", subj, sizeof (subj))) {
  1777. !             if (arr_ptr && ! expired_time) {
  1778. !                 if (arr_ptr[i].icase) {
  1779. !                     str_lwr (subj, subj);
  1780. !                 } 
  1781. !                 arr_ptr[i].subj = str_dup (subj);
  1782. !             }
  1783.   if (debug) {
  1784.       if (global) {
  1785.           printf ("6. buf=[%s]  Gsubj=[%s]\n", arr_ptr[i].subj, glob_filter.filter[i].subj);
  1786. --- 203,317 ----
  1787.           if (*buf == '#' || *buf == '\n') {
  1788.               continue;
  1789.           }
  1790. !         switch(tolower(buf[0])) {
  1791. !         case 'c':
  1792. !             if (match_integer (buf, "case=", &icase)) {
  1793. !                 if (arr_ptr && ! expired_time) {
  1794. !                     arr_ptr[i].icase = icase;
  1795. !                 }
  1796. !                 break;
  1797. !             }
  1798. !             break;
  1799. !         case 'f':
  1800. !             if (match_string (buf, "from=", from, sizeof (from))) {
  1801. !                 if (arr_ptr && ! expired_time) {
  1802. !                     if (arr_ptr[i].icase) {
  1803. !                         str_lwr (from, from);
  1804. !                     } 
  1805. !                     arr_ptr[i].from = str_dup (from);
  1806. !                 }
  1807. !                 break;
  1808. !             }
  1809. !             break;
  1810. !         case 'g':
  1811. !             if (match_string (buf, "group=", group, sizeof (group))) {
  1812.   if (debug) {
  1813.       printf ("group=[%s]\n", group);
  1814.       fflush (stdout);
  1815.   }
  1816. !                 psGrp = psGrpFind (group);
  1817. !                 if (psGrp != (struct t_group *) 0) {    /* switch to group filter */
  1818. !                     global = FALSE;
  1819. !                     if (psGrp->grps_filter == (struct t_filters *) 0) {
  1820.   if (debug) {
  1821.       printf ("Allocating grp_filter for group=[%s]\n", psGrp->name);
  1822.       fflush (stdout);
  1823.   }
  1824. !                         psGrp->grps_filter = 
  1825. !                             (struct t_filters *) my_malloc (sizeof (struct t_filters));
  1826. !                         psGrp->grps_filter->num = 0;
  1827. !                         psGrp->grps_filter->max = 0;
  1828. !                         psGrp->grps_filter->filter = (struct t_filter *) 0;
  1829. !                     }
  1830. !                 }
  1831. !                 subj[0] = '\0';
  1832. !                 from[0] = '\0';
  1833. !                 msgid[0] = '\0';
  1834. !                 lines[0] = '\0';
  1835. !                 secs = 0L;
  1836. !                 break;
  1837. !             }
  1838. !             break;
  1839. !         case 'l':
  1840. !             if (match_string (buf, "lines=", lines, sizeof (lines))) {
  1841. !                 if (arr_ptr && ! expired_time) {
  1842. !                     if (lines[0] == '<') {
  1843. !                         arr_ptr[i].lines_cmp = FILTER_LINES_LT;
  1844. !                         arr_ptr[i].lines_num = atoi (&lines[1]);
  1845. !                     } else if (lines[0] == '>') {
  1846. !                         arr_ptr[i].lines_cmp = FILTER_LINES_GT;
  1847. !                         arr_ptr[i].lines_num = atoi (&lines[1]);
  1848. !                     } else {
  1849. !                         arr_ptr[i].lines_cmp = FILTER_LINES_EQ;
  1850. !                         arr_ptr[i].lines_num = atoi (lines);
  1851. !                     }
  1852. !                 }
  1853. !                 break;
  1854. !             }
  1855. !             break;
  1856. !         case 'm':
  1857. !             if (match_string (buf, "msgid=", msgid, sizeof (msgid))) {
  1858. !                 if (arr_ptr) {
  1859. !                     arr_ptr[i].msgid = str_dup (msgid);
  1860. !                 }
  1861. !                 break;
  1862. !             }
  1863. !             break;
  1864. !         case 's':
  1865. !             if (match_string (buf, "scope=", scope, sizeof (scope))) {
  1866.   if (debug) {
  1867. !     printf ("scope=[%s] num=[%d]\n", scope, glob_filter.num);
  1868.       fflush (stdout);
  1869.   }
  1870. !                 global = TRUE;
  1871. !                 arr_num = &glob_filter.num;
  1872. !                 arr_max = &glob_filter.max;
  1873.                   if (*arr_num >= (*arr_max - 1)) {
  1874. !                     glob_filter.filter = psExpandFilterArray (
  1875. !                         glob_filter.filter, arr_max);
  1876.                   }
  1877. !                 arr_ptr = glob_filter.filter;
  1878.                   i = *arr_num;
  1879.                   (*arr_num)++;
  1880.                   vSetFilter (&arr_ptr[i]);
  1881.                   expired_time = FALSE;
  1882. !                 arr_ptr[i].scope = str_dup (scope);
  1883.                   subj[0] = '\0';
  1884.                   from[0] = '\0';
  1885.                   msgid[0] = '\0';
  1886.                   lines[0] = '\0';
  1887. +                 icase = 0;
  1888.                   secs = 0L;
  1889. +                 psGrp = (struct t_group *) 0;    /* fudge for out of order rules */
  1890. +                 break;
  1891.               }
  1892. !             if (match_string (buf, "subj=", subj, sizeof (subj))) {
  1893. !                 if (arr_ptr && ! expired_time) {
  1894. !                     if (arr_ptr[i].icase) {
  1895. !                         str_lwr (subj, subj);
  1896. !                     } 
  1897. !                     arr_ptr[i].subj = str_dup (subj);
  1898. !                 }
  1899.   if (debug) {
  1900.       if (global) {
  1901.           printf ("6. buf=[%s]  Gsubj=[%s]\n", arr_ptr[i].subj, glob_filter.filter[i].subj);
  1902. ***************
  1903. *** 312,363 ****
  1904.           fflush (stdout);
  1905.       }
  1906.   }
  1907. !             continue;
  1908. !         }
  1909. !         if (match_string (buf, "from=", from, sizeof (from))) {
  1910. !             if (arr_ptr && ! expired_time) {
  1911. !                 if (arr_ptr[i].icase) {
  1912. !                     str_lwr (from, from);
  1913. !                 } 
  1914. !                 arr_ptr[i].from = str_dup (from);
  1915. !             }
  1916. !             continue;
  1917. !         }
  1918. !         if (match_string (buf, "msgid=", msgid, sizeof (msgid))) {
  1919. !             if (arr_ptr) {
  1920. !                 arr_ptr[i].msgid = str_dup (msgid);
  1921. !             }
  1922. !             continue;
  1923. !         }
  1924. !         if (match_string (buf, "lines=", lines, sizeof (lines))) {
  1925. !             if (arr_ptr && ! expired_time) {
  1926. !                 if (lines[0] == '<') {
  1927. !                     arr_ptr[i].lines_cmp = FILTER_LINES_LT;
  1928. !                     arr_ptr[i].lines_num = atoi (&lines[1]);
  1929. !                 } else if (lines[0] == '>') {
  1930. !                     arr_ptr[i].lines_cmp = FILTER_LINES_GT;
  1931. !                     arr_ptr[i].lines_num = atoi (&lines[1]);
  1932. !                 } else {
  1933. !                     arr_ptr[i].lines_cmp = FILTER_LINES_EQ;
  1934. !                     arr_ptr[i].lines_num = atoi (lines);
  1935. !                 }
  1936. !             }
  1937. !             continue;
  1938. !         }
  1939. !          if (match_long (buf, "time=", &secs)) {
  1940. !             if (arr_ptr && ! expired_time) {
  1941. !                 arr_ptr[i].time = secs;
  1942. !                 if (secs && current_secs > secs) {
  1943.   if (debug) {
  1944.       printf ("EXPIRED  secs=[%ld]  current_secs=[%ld]\n", secs, current_secs);
  1945.       fflush (stdout);
  1946.   }
  1947. !                     (*arr_num)--;
  1948. !                     expired_time = TRUE;
  1949. !                     expired = TRUE;
  1950.                   }
  1951.               }
  1952. !             continue;
  1953.           }
  1954.       }
  1955.       fclose (fp);
  1956. --- 321,378 ----
  1957.           fflush (stdout);
  1958.       }
  1959.   }
  1960. !                 break;
  1961. !             }
  1962. !             break;
  1963. !         case 't':
  1964. !             if (match_integer (buf, "type=", &type)) {
  1965. ! if (debug) {
  1966. !     printf ("type=[%d][%s]\n", type, (type == 0 ? "KILL" : "SELECT"));
  1967. !     fflush (stdout);
  1968. ! }
  1969. !                 if (psGrp && ! global) {
  1970. !                     arr_num = &psGrp->grps_filter->num;
  1971. !                     arr_max = &psGrp->grps_filter->max;
  1972. !                     if (*arr_num >= (*arr_max - 1)) {
  1973. !                         psGrp->grps_filter->filter = psExpandFilterArray (
  1974. !                             psGrp->grps_filter->filter, arr_max);
  1975. !                     }
  1976. !                     arr_ptr = psGrp->grps_filter->filter;
  1977. !                     i = *arr_num;
  1978. !                     (*arr_num)++;
  1979. !                     vSetFilter (&arr_ptr[i]);
  1980. !                     expired_time = FALSE;
  1981. ! if (debug) {
  1982. !     printf ("grp_filter num=[%d] max=[%d]\n", *arr_num, *arr_max);
  1983. !     fflush (stdout);
  1984. ! }
  1985. !                     subj[0] = '\0';
  1986. !                     from[0] = '\0';
  1987. !                     msgid[0] = '\0';
  1988. !                     lines[0] = '\0';
  1989. !                     secs = 0L;
  1990. !                 }
  1991. !                 if (arr_ptr) {
  1992. !                     arr_ptr[i].type = type;
  1993. !                 }
  1994. !                 break;
  1995. !             }
  1996. !              if (match_long (buf, "time=", &secs)) {
  1997. !                 if (arr_ptr && ! expired_time) {
  1998. !                     arr_ptr[i].time = secs;
  1999. !                     if (secs && current_secs > secs) {
  2000.   if (debug) {
  2001.       printf ("EXPIRED  secs=[%ld]  current_secs=[%ld]\n", secs, current_secs);
  2002.       fflush (stdout);
  2003.   }
  2004. !                         (*arr_num)--;
  2005. !                         expired_time = TRUE;
  2006. !                         expired = TRUE;
  2007. !                     }
  2008.                   }
  2009. +                 break;
  2010.               }
  2011. !             break;
  2012.           }
  2013.       }
  2014.       fclose (fp);
  2015. diff -cr 950726/src/hashstr.c 950726.new/src/hashstr.c
  2016. *** 950726/src/hashstr.c    Thu Dec 01 17:00:42 1994
  2017. --- 950726.new/src/hashstr.c    Fri Jul 28 07:45:48 1995
  2018. ***************
  2019. *** 36,47 ****
  2020.   struct t_hashnode *table[HASHNODE_TABLE_SIZE];
  2021.   #endif
  2022.   
  2023.   char *
  2024.   hash_str (s)
  2025.       char *s;
  2026.   {
  2027.       long h;                /* result of hash:  index into hash table */
  2028. !     struct t_hashnode *p;    /* used to descend the spillover structs */
  2029.   
  2030.       if (s == (char *) 0) {
  2031.           return ((char *) 0);
  2032. --- 36,49 ----
  2033.   struct t_hashnode *table[HASHNODE_TABLE_SIZE];
  2034.   #endif
  2035.   
  2036. + static struct t_hashnode *add_string (char *s);
  2037.   char *
  2038.   hash_str (s)
  2039.       char *s;
  2040.   {
  2041.       long h;                /* result of hash:  index into hash table */
  2042. !     struct t_hashnode **p;    /* used to descend the spillover structs */
  2043.   
  2044.       if (s == (char *) 0) {
  2045.           return ((char *) 0);
  2046. ***************
  2047. *** 49,84 ****
  2048.   
  2049.       {
  2050.           unsigned char *t = (unsigned char *) s;
  2051. !         h = *t++;
  2052. !         while (*t)
  2053. !             h = ((h << 1) ^ *t++) % (long) HASHNODE_TABLE_SIZE;
  2054. !     }
  2055.   
  2056. !     p = table[h];
  2057. !     if (p == (struct t_hashnode *) 0) {
  2058. !         table[h] = add_string (s);
  2059. !         return table[h]->s;
  2060.       }
  2061.   
  2062. !     while (TRUE) {
  2063. !         if (STRCMPEQ(s, p->s)) {
  2064. !             return (p->s);
  2065. !         }
  2066.   
  2067. !         if (p->next == (struct t_hashnode *) 0) {
  2068. !             p->next = add_string (s);
  2069. !             return p->next->s;
  2070. !         } else {
  2071. !             p = p->next;
  2072.           }
  2073.       }
  2074. !     /* NOTREACHED */
  2075.   }
  2076.   
  2077.   
  2078. ! struct t_hashnode *
  2079.   add_string (s)
  2080.       char *s;
  2081.   {
  2082. --- 51,82 ----
  2083.   
  2084.       {
  2085.           unsigned char *t = (unsigned char *) s;
  2086. !         int len;
  2087.   
  2088. !         h = 0; len = 0;
  2089. !         while (*t) {
  2090. !             h = (h << 1) ^ *t++;
  2091. !             if (++len & 7) continue;
  2092. !             h %= (long) HASHNODE_TABLE_SIZE;
  2093. !         }
  2094. !         h %= (long) HASHNODE_TABLE_SIZE;
  2095.       }
  2096.   
  2097. !     p = &table[h];
  2098.   
  2099. !     while (*p) {
  2100. !         if (STRCMPEQ(s, (*p)->s)) {
  2101. !             return (*p)->s;
  2102.           }
  2103. +         p = &(*p)->next;
  2104.       }
  2105. !     *p = add_string (s);
  2106. !     return (*p)->s;
  2107.   }
  2108.   
  2109.   
  2110. ! static struct t_hashnode *
  2111.   add_string (s)
  2112.       char *s;
  2113.   {
  2114. ***************
  2115. *** 85,99 ****
  2116.       int *iptr;
  2117.       struct t_hashnode *p;
  2118.   
  2119. !     p = (struct t_hashnode *) my_malloc (sizeof (struct t_hashnode));
  2120.   
  2121.       p->next = (struct t_hashnode *) 0;
  2122.   #ifndef OLD_THREADING
  2123. -     iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int)*2 + 1);
  2124.       *iptr++ = -1;
  2125.       *iptr++ = -1;
  2126.   #else
  2127. -     iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int) + 1);
  2128.       *iptr++ = -1;
  2129.   #endif
  2130.       p->s = (char *) iptr;
  2131. --- 83,97 ----
  2132.       int *iptr;
  2133.       struct t_hashnode *p;
  2134.   
  2135. !     p = (struct t_hashnode *) my_malloc (sizeof (struct t_hashnode)
  2136. !         + sizeof (int) * 2 + strlen(s) + 1);
  2137.   
  2138.       p->next = (struct t_hashnode *) 0;
  2139. +     iptr = (int *) &p[1];
  2140.   #ifndef OLD_THREADING
  2141.       *iptr++ = -1;
  2142.       *iptr++ = -1;
  2143.   #else
  2144.       *iptr++ = -1;
  2145.   #endif
  2146.       p->s = (char *) iptr;
  2147. ***************
  2148. *** 124,130 ****
  2149.   hash_reclaim ()
  2150.   {
  2151.       int i;
  2152. -     int *iptr;
  2153.       struct t_hashnode *p, *next;
  2154.   
  2155.   #ifdef M_AMIGA
  2156. --- 122,127 ----
  2157. ***************
  2158. *** 138,152 ****
  2159.               p = table[i];
  2160.               while (p != (struct t_hashnode *) 0) {
  2161.                   next = p->next;
  2162. -                 if (p->s != (char *) 0) {
  2163. -                     iptr = (int *) p->s;
  2164. - #ifndef OLD_THREADING
  2165. -                     iptr-=2;
  2166. - #else
  2167. -                     iptr--;
  2168. - #endif
  2169. -                     free ((char *) iptr);
  2170. -                 }
  2171.                   free ((char *) p);
  2172.                   p = next;
  2173.               }
  2174. --- 135,140 ----
  2175. diff -cr 950726/src/init.c 950726.new/src/init.c
  2176. *** 950726/src/init.c    Fri Jul 28 05:20:28 1995
  2177. --- 950726.new/src/init.c    Fri Jul 28 11:30:48 1995
  2178. ***************
  2179. *** 112,117 ****
  2180. --- 112,118 ----
  2181.   int real_umask;
  2182.   int show_description;
  2183.   int strip_blanks;
  2184. + int sigdashes;                /* set TRUE to prepend every signature with dashes */
  2185.   int start_editor_offset;
  2186.   int tin_uid;
  2187.   int tin_gid;
  2188. ***************
  2189. *** 143,148 ****
  2190. --- 144,153 ----
  2191.   int thread_catchup_on_exit;    /* catchup thread with left arrow key or not */
  2192.   int groupname_max_length;    /* max len of group names to display on screen */
  2193.   int use_keypad;                /* enables/disables scroll keys on supported terminals */
  2194. + #ifdef HAVE_METAMAIL
  2195. + int use_metamail;            /* enables/disables metamail on MIME messages */
  2196. + int ask_for_metamail;        /* enables/disables the metamail query if a MIME message is going to be displayed */
  2197. + #endif
  2198.   int use_mouse;                /* enables/disables mouse support under xterm */
  2199.   int auto_cc;                /* add your name to cc automatically */
  2200.   int global_filtered_articles;    /* globally killed / auto-selected articles */
  2201. ***************
  2202. *** 187,193 ****
  2203.   int xcut_and_paste;                /* xterm button cut & paste at article level */
  2204.   int xmouse, xrow, xcol;            /* xterm button pressing information */
  2205.   int reread_active_file_secs;    /* reread active file interval in seconds */
  2206. - int use_metamail = TRUE;
  2207.   
  2208.   #ifndef M_AMIGA
  2209.   struct passwd *myentry;
  2210. --- 192,197 ----
  2211. ***************
  2212. *** 368,373 ****
  2213. --- 372,378 ----
  2214.       show_last_line_prev_page = FALSE;
  2215.       show_description = TRUE;
  2216.       show_only_unread_groups = FALSE;
  2217. +     sigdashes = TRUE;
  2218.       strip_blanks = TRUE;
  2219.   #ifdef M_UNIX
  2220.       start_editor_offset = TRUE;
  2221. ***************
  2222. *** 388,393 ****
  2223. --- 393,407 ----
  2224.       use_builtin_inews = TRUE;
  2225.       use_keypad = FALSE;
  2226.       use_mouse = TRUE;
  2227. + #ifdef HAVE_METAMAIL
  2228. + #    ifdef M_AMIGA
  2229. +         /* for all those AmigaElm users ... ;-) */
  2230. +         use_metamail = (getenv ("NoMetaMail") != NULL) ? TRUE : FALSE;
  2231. + #    else
  2232. +         use_metamail = TRUE;
  2233. + #    endif
  2234. +     ask_for_metamail = TRUE;
  2235. + #endif
  2236.       xcut_and_paste = FALSE;
  2237.   
  2238.       index_maildir[0] = '\0';
  2239. ***************
  2240. *** 458,463 ****
  2241. --- 472,484 ----
  2242.       strcpy (default_mailer_format, mailer);
  2243.   #endif
  2244.       strcpy (default_printer, DEFAULT_PRINTER);
  2245. + #ifdef M_AMIGA
  2246. +     {    extern int tin_bbs_mode;
  2247. +         if (tin_bbs_mode) {
  2248. +             strcpy(default_printer, DEFAULT_BBS_PRINTER);
  2249. +         }
  2250. +     }
  2251. + #endif
  2252.       strcpy (mailer, get_val (ENV_VAR_MAILER, DEFAULT_MAILER));
  2253.       strcpy (quote_chars, DEFAULT_COMMENT);
  2254.   
  2255. diff -cr 950726/src/memory.c 950726.new/src/memory.c
  2256. *** 950726/src/memory.c    Tue Nov 15 00:16:56 1994
  2257. --- 950726.new/src/memory.c    Fri Jul 28 06:53:01 1995
  2258. ***************
  2259. *** 447,453 ****
  2260.   #ifdef DEBUG
  2261.       vDbgPrintMalloc (TRUE, file, line, size);
  2262.   #endif
  2263. !     if ((p = (char *) calloc (1, size)) == NULL) {
  2264.           sprintf (buf, txt_out_of_memory, progname, size, file, line);
  2265.           error_message (buf, "");
  2266.   /*        vPrintBugAddress (); */
  2267. --- 447,453 ----
  2268.   #ifdef DEBUG
  2269.       vDbgPrintMalloc (TRUE, file, line, size);
  2270.   #endif
  2271. !     if ((p = (char *) malloc (size)) == NULL) {
  2272.           sprintf (buf, txt_out_of_memory, progname, size, file, line);
  2273.           error_message (buf, "");
  2274.   /*        vPrintBugAddress (); */
  2275. diff -cr 950726/src/misc.c 950726.new/src/misc.c
  2276. *** 950726/src/misc.c    Fri Jul 28 05:20:30 1995
  2277. --- 950726.new/src/misc.c    Fri Jul 28 07:02:30 1995
  2278. ***************
  2279. *** 60,65 ****
  2280. --- 60,77 ----
  2281.       char buf[8192];
  2282.       int retcode;
  2283.   
  2284. +     if (!prefix || !prefix[0]) {
  2285. +         int n;
  2286. +         while ((n = fread(buf,1,sizeof(buf),fp_ip)) > 0) {
  2287. +             if (n != fwrite(buf,1,n,fp_op)) {
  2288. +                 sprintf (msg, "Failed copy_fp(). errno=%d", errno);
  2289. +                 perror_message (msg, "");
  2290. +                 return;
  2291. +             }
  2292. +         }
  2293. +         return;
  2294. +     }
  2295.       while (fgets (buf, sizeof (buf), fp_ip) != (char *) 0) {
  2296.           retcode = fprintf (fp_op, "%s%s", prefix, buf);
  2297.   /*
  2298. ***************
  2299. *** 430,443 ****
  2300.       return val;
  2301.   #else
  2302.       unsigned long hash_value = 0L;
  2303.       unsigned char *ptr = (unsigned char *) group;
  2304.   
  2305. !     if (*ptr) {
  2306. !         hash_value = *ptr++;
  2307. !         while (*ptr)
  2308. !             hash_value = ((hash_value << 1) ^ *ptr++) % TABLE_SIZE;
  2309.       }
  2310.       return (hash_value);
  2311.   #endif
  2312.   }
  2313. --- 442,457 ----
  2314.       return val;
  2315.   #else
  2316.       unsigned long hash_value = 0L;
  2317. +     unsigned int len = 0;
  2318.       unsigned char *ptr = (unsigned char *) group;
  2319.   
  2320. !     while (*ptr) {
  2321. !         hash_value = (hash_value << 1) ^ *ptr++;
  2322. !         if (++len & 7) continue;
  2323. !         hash_value %= TABLE_SIZE;
  2324.       }
  2325. +     hash_value %= TABLE_SIZE;
  2326.       return (hash_value);
  2327.   #endif
  2328.   }
  2329. ***************
  2330. *** 979,985 ****
  2331.    *  strcmp that ignores case
  2332.    */
  2333.   
  2334. ! #define FOLD_TO_UPPER(a)    (islower ((int) (a)) ? toupper ((int) (a)) : (a))
  2335.   
  2336.   int
  2337.   my_stricmp (p, q)
  2338. --- 993,999 ----
  2339.    *  strcmp that ignores case
  2340.    */
  2341.   
  2342. ! #define FOLD_TO_UPPER(a)    (toupper ((int) (a)))
  2343.   
  2344.   int
  2345.   my_stricmp (p, q)
  2346. ***************
  2347. *** 986,998 ****
  2348.       char *p;
  2349.       char *q;
  2350.   {
  2351. !     for (; FOLD_TO_UPPER (*p) == FOLD_TO_UPPER (*q); ++p, ++q) {
  2352.           if (*p == '\0') {
  2353.               return (0);
  2354.           }
  2355.       }
  2356.   
  2357. !     return (FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q));
  2358.   }
  2359.   
  2360.   /*
  2361. --- 1000,1029 ----
  2362.       char *p;
  2363.       char *q;
  2364.   {
  2365. !     int r;
  2366. !     for (; (r = FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q)) == 0; ++p, ++q) {
  2367.           if (*p == '\0') {
  2368.               return (0);
  2369.           }
  2370.       }
  2371.   
  2372. !     return r;
  2373. ! }
  2374. ! int
  2375. ! my_strnicmp(p, q, n)
  2376. !     char *p;
  2377. !     char *q;
  2378. !     size_t n;
  2379. ! {
  2380. !     int r;
  2381. !     for (; n && (r = (FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q))) == 0;
  2382. !             ++p, ++q, --n) {
  2383. !         if (*p == '\0') {
  2384. !             return (0);
  2385. !         }
  2386. !     }
  2387. !     return n ? r : 0;
  2388.   }
  2389.   
  2390.   /*
  2391. diff -cr 950726/src/newsrc.c 950726.new/src/newsrc.c
  2392. *** 950726/src/newsrc.c    Fri Jul 28 05:20:32 1995
  2393. --- 950726.new/src/newsrc.c    Fri Jul 28 07:04:11 1995
  2394. ***************
  2395. *** 1166,1176 ****
  2396.   
  2397.           /* Mark earlier articles as read, updating num_unread */
  2398.   
  2399. !         if (first < min) {
  2400. !             long i;
  2401. !             if (first < group->newsrc.xmin) {
  2402. !                 NSETRNG0 (newbitmap, 0, group->newsrc.xmin - first - 1);
  2403. !             }
  2404.               for (i = group->newsrc.xmin; i < min; i++) {
  2405.                   if (NTEST(newbitmap, i - first) != ART_READ) {
  2406.                       NSET0(newbitmap, i - first);
  2407. --- 1166,1175 ----
  2408.   
  2409.           /* Mark earlier articles as read, updating num_unread */
  2410.   
  2411. !         if (first < group->newsrc.xmin) {
  2412. !             NSETRNG0 (newbitmap, 0, group->newsrc.xmin - first - 1);
  2413. !         }
  2414. !         {    long i;
  2415.               for (i = group->newsrc.xmin; i < min; i++) {
  2416.                   if (NTEST(newbitmap, i - first) != ART_READ) {
  2417.                       NSET0(newbitmap, i - first);
  2418. diff -cr 950726/src/page.c 950726.new/src/page.c
  2419. *** 950726/src/page.c    Fri Jul 28 05:20:34 1995
  2420. --- 950726.new/src/page.c    Fri Jul 28 07:09:26 1995
  2421. ***************
  2422. *** 768,783 ****
  2423.       }
  2424.       
  2425.   #ifdef HAVE_METAMAIL
  2426. !     if (use_metamail == TRUE && note_page == 0 && *note_h_mimeversion &&
  2427.           *note_h_contenttype && *note_h_contentenc &&
  2428.           (!STRNCMPEQ("text/plain", note_h_contenttype, 10) 
  2429.           /* || !STRCMPEQ("bit", note_h_contentenc + 1) */ )) {
  2430. !         if (prompt_yn (cLINES, txt_use_mime, TRUE) == 1) {
  2431.               show_mime_article (note_fp, &arts[respnum]);
  2432.               return;
  2433. -         } else {
  2434. -             show_first_header (respnum, group);
  2435.           }
  2436.       }
  2437.   #endif
  2438.   
  2439. --- 768,783 ----
  2440.       }
  2441.       
  2442.   #ifdef HAVE_METAMAIL
  2443. !     if (note_page == 0 && *note_h_mimeversion &&
  2444.           *note_h_contenttype && *note_h_contentenc &&
  2445.           (!STRNCMPEQ("text/plain", note_h_contenttype, 10) 
  2446.           /* || !STRCMPEQ("bit", note_h_contentenc + 1) */ )) {
  2447. !         if (use_metamail && (!ask_for_metamail ||
  2448. !                 prompt_yn (cLINES, txt_use_mime, TRUE) == 1)) {
  2449.               show_mime_article (note_fp, &arts[respnum]);
  2450.               return;
  2451.           }
  2452. +         show_first_header (respnum, group);
  2453.       }
  2454.   #endif
  2455.   
  2456. ***************
  2457. *** 1366,1379 ****
  2458.       size_t len;
  2459.   {
  2460.       size_t    plen = strlen (pat);
  2461. -     char buf_lwr[HEADER_LEN];
  2462. -     char pat_lwr[LEN];
  2463.   
  2464. !     str_lwr(buf, buf_lwr);
  2465. !     buf_lwr[plen] = '\0';
  2466. !     str_lwr(pat, pat_lwr);
  2467.   
  2468. !     if(STRNCMPEQ(buf_lwr, pat_lwr, plen) && buf[plen] == ':' && buf[plen + 1] == ' ') {
  2469.           plen += 2;
  2470.           while (buf[plen] == ' ') {
  2471.               plen++;
  2472. --- 1366,1378 ----
  2473.       size_t len;
  2474.   {
  2475.       size_t    plen = strlen (pat);
  2476.   
  2477. !     /* A quick check on the length before calling strnicmp() etc. */
  2478. !     if (buf[plen] != ':' || buf[plen+1] != ' ') {
  2479. !         return FALSE;
  2480. !     }
  2481.   
  2482. !     if(my_strnicmp(buf, pat, plen) == 0) {
  2483.           plen += 2;
  2484.           while (buf[plen] == ' ') {
  2485.               plen++;
  2486. diff -cr 950726/src/pgp.c 950726.new/src/pgp.c
  2487. *** 950726/src/pgp.c    Fri Jul 28 05:20:34 1995
  2488. --- 950726.new/src/pgp.c    Fri Jul 28 07:10:49 1995
  2489. ***************
  2490. *** 43,49 ****
  2491.   static void split_file P_((char *file));
  2492.   static void do_pgp P_((int what, char *file, char *mail_to));
  2493.   static void pgp_append_public_key P_((char *file));
  2494. ! static int pgp_available P_(());
  2495.   
  2496.   static void
  2497.   join_files (file)
  2498. --- 43,49 ----
  2499.   static void split_file P_((char *file));
  2500.   static void do_pgp P_((int what, char *file, char *mail_to));
  2501.   static void pgp_append_public_key P_((char *file));
  2502. ! static int pgp_available P_((void));
  2503.   
  2504.   static void
  2505.   join_files (file)
  2506. diff -cr 950726/src/search.c 950726.new/src/search.c
  2507. *** 950726/src/search.c    Tue May 16 00:07:18 1995
  2508. --- 950726.new/src/search.c    Fri Jul 28 07:11:42 1995
  2509. ***************
  2510. *** 549,563 ****
  2511.       char *dst;
  2512.   {
  2513.       while (*src) {
  2514. !         if (isupper(*src)) {
  2515. !             *dst = tolower(*src);
  2516. !         } else {
  2517. !             *dst = *src;
  2518. !         }
  2519.           src++;
  2520. -         dst++;
  2521.       }
  2522.       *dst = '\0';
  2523.   }
  2524. --- 549,556 ----
  2525.       char *dst;
  2526.   {
  2527.       while (*src) {
  2528. !         *dst++ = tolower(*src);
  2529.           src++;
  2530.       }
  2531.       *dst = '\0';
  2532.   }
  2533. diff -cr 950726/src/sigfile.c 950726.new/src/sigfile.c
  2534. *** 950726/src/sigfile.c    Wed Jun 21 23:06:00 1995
  2535. --- 950726.new/src/sigfile.c    Fri Jul 28 07:13:13 1995
  2536. ***************
  2537. *** 67,73 ****
  2538.           if (debug == 2) {
  2539.               error_message ("USING random sig=[%s]", sigfile);
  2540.           }
  2541. !         fprintf (fp, "\n-- \n");
  2542.           joinpath (path, homedir, ".sigfixed");
  2543.           if ((fixfp = fopen (path, "r")) != (FILE *) 0) {
  2544.               copy_fp (fixfp, fp, "");
  2545. --- 67,73 ----
  2546.           if (debug == 2) {
  2547.               error_message ("USING random sig=[%s]", sigfile);
  2548.           }
  2549. !         fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  2550.           joinpath (path, homedir, ".sigfixed");
  2551.           if ((fixfp = fopen (path, "r")) != (FILE *) 0) {
  2552.               copy_fp (fixfp, fp, "");
  2553. ***************
  2554. *** 84,90 ****
  2555.        */
  2556.       if ((sigfp = fopen (default_signature, "r")) != (FILE *) 0) {
  2557.           if (flag) {
  2558. !             fprintf (fp, "\n-- \n");
  2559.               copy_fp (sigfp, fp, "");
  2560.           }
  2561.           fclose (sigfp);
  2562. --- 84,90 ----
  2563.        */
  2564.       if ((sigfp = fopen (default_signature, "r")) != (FILE *) 0) {
  2565.           if (flag) {
  2566. !             fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  2567.               copy_fp (sigfp, fp, "");
  2568.           }
  2569.           fclose (sigfp);
  2570. ***************
  2571. *** 92,98 ****
  2572.       }
  2573.   
  2574.       if ((sigfp = fopen (path, "r")) != (FILE *) 0) {
  2575. !         fprintf (fp, "\n-- \n");
  2576.           copy_fp (sigfp, fp, "");
  2577.           fclose (sigfp);
  2578.       }
  2579. --- 92,98 ----
  2580.       }
  2581.   
  2582.       if ((sigfp = fopen (path, "r")) != (FILE *) 0) {
  2583. !         fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  2584.           copy_fp (sigfp, fp, "");
  2585.           fclose (sigfp);
  2586.       }
  2587.